Author: sh-sh-sh Date: Thu Jan 24 14:41:23 2008 New Revision: 43879 URL: http://svn.opensuse.org/viewcvs/yast?rev=43879&view=rev Log: transparent enableDebugLogging Modified: trunk/core/libyui/src/YUI.h trunk/core/libyui/src/YUI_core.cc Modified: trunk/core/libyui/src/YUI.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libyui/src/YUI.h?rev=43879&r1=43878&r2=43879&view=diff ============================================================================== --- trunk/core/libyui/src/YUI.h (original) +++ trunk/core/libyui/src/YUI.h Thu Jan 24 14:41:23 2008 @@ -647,6 +647,17 @@ **/ void playNextMacroBlock(); + /** + * Check if debug logging is enabled. + **/ + bool debugLoggingEnabled() const; + + /** + * Enable or disable debug logging. + * This will propagate the parameter to YUILog::enableDebugLogging(), + * but it might do more than just that. + **/ + void enableDebugLogging( bool enable = true ); Modified: trunk/core/libyui/src/YUI_core.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libyui/src/YUI_core.cc?rev=43879&r1=43878&r2=43879&view=diff ============================================================================== --- trunk/core/libyui/src/YUI_core.cc (original) +++ trunk/core/libyui/src/YUI_core.cc Thu Jan 24 14:41:23 2008 @@ -406,24 +406,6 @@ // ---------------------------------------------------------------------- -// Default implementations for the virtual methods the deal with -// event processing - -#if 0 - -void YUI::idleLoop( int fd_ycp ) -{ - // Just wait for fd_ycp to become readable - fd_set fdset; - FD_ZERO( & fdset ); - FD_SET( fd_ycp, & fdset ); - // FIXME: check for EINTR - select( fd_ycp+1, & fdset, 0, 0, 0 ); -} - -#endif - -// ---------------------------------------------------------------------- void *start_ui_thread( void * yui ) @@ -440,6 +422,25 @@ } + + +// FIXME: Move this to another class +// (YUI should become independent of YCP and the YaST2 infrastructure) + +bool YUI::debugLoggingEnabled() const +{ + return get_log_debug(); +} + + +void +YUI::enableDebugLogging( bool enable ) +{ + YUILog::enableDebugLogging( enable ); + set_log_debug( enable ); +} + + static void yui_y2logger( YUILogLevel_t logLevel, const char * logComponent, -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org