From fd7718b28c13d8fa4643bada1da1d9c839e2d8e7 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 10 Jul 2001 17:33:53 +0000 Subject: [PATCH] made wxLog::Set/GetVerbose() static back again git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/log.h | 6 +++--- src/common/log.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/wx/log.h b/include/wx/log.h index db1f30d5d1..7c8c0eadbe 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -158,7 +158,7 @@ public: // functions controlling the default wxLog behaviour // verbose mode is activated by standard command-line '-verbose' // option - void SetVerbose(bool bVerbose = TRUE) { m_bVerbose = bVerbose; } + static void SetVerbose(bool bVerbose = TRUE) { ms_bVerbose = bVerbose; } // should GetActiveTarget() try to create a new log object if the // current is NULL? static void DontCreateOnDemand(); @@ -179,7 +179,7 @@ public: // accessors // gets the verbose status - bool GetVerbose() const { return m_bVerbose; } + static bool GetVerbose() { return ms_bVerbose; } // get trace mask static wxTraceMask GetTraceMask() { return ms_ulTraceMask; } // is this trace mask in the list? @@ -199,7 +199,6 @@ public: protected: bool m_bHasMessages; // any messages in the queue? - bool m_bVerbose; // FALSE => ignore LogInfo messages // the logging functions that can be overriden // default DoLog() prepends the time stamp and a prefix corresponding @@ -216,6 +215,7 @@ private: static wxLog *ms_pLogger; // currently active log sink static bool ms_doLog; // FALSE => all logging disabled static bool ms_bAutoCreate; // create new log targets on demand? + static bool ms_bVerbose; // FALSE => ignore LogInfo messages static size_t ms_suspendCount; // if positive, logs are not flushed diff --git a/src/common/log.cpp b/src/common/log.cpp index 03838b73d7..fc67d1ef88 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -284,7 +284,6 @@ void WXDLLEXPORT wxLogSysError(long lErrCode, const wxChar *szFormat, ...) wxLog::wxLog() { m_bHasMessages = FALSE; - m_bVerbose = FALSE; } wxLog *wxLog::GetActiveTarget() @@ -585,6 +584,7 @@ void wxLogStream::DoLogString(const wxChar *szString, time_t WXUNUSED(t)) wxLog *wxLog::ms_pLogger = (wxLog *)NULL; bool wxLog::ms_doLog = TRUE; bool wxLog::ms_bAutoCreate = TRUE; +bool wxLog::ms_bVerbose = FALSE; size_t wxLog::ms_suspendCount = 0; -- 2.47.2