Make wxLog::EnableLogging() and wxLogNull thread-specific.
Disabling logging in a single thread (even the main one) shouldn't disable logs from the background threads which should disable their logging themselves as/if needed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -30,7 +30,18 @@ class WXDLLIMPEXP_FWD_BASE wxLog;
|
||||
// NB: this must be a POD to be stored in TLS
|
||||
struct wxThreadSpecificInfo
|
||||
{
|
||||
// the thread-specific logger or NULL if the thread is using the global one
|
||||
// (this is not used for the main thread which always uses the global
|
||||
// logger)
|
||||
wxLog *logger;
|
||||
|
||||
// true if logging is currently disabled for this thread (this is also not
|
||||
// used for the main thread which uses wxLog::ms_doLog)
|
||||
//
|
||||
// NB: we use a counter-intuitive "disabled" flag instead of "enabled" one
|
||||
// because the default, for 0-initialized struct, should be to enable
|
||||
// logging
|
||||
bool loggingDisabled;
|
||||
};
|
||||
|
||||
// currently this is defined in src/common/log.cpp
|
||||
|
Reference in New Issue
Block a user