From 6b668396db1894aadc7efa9786cb75ed84135c32 Mon Sep 17 00:00:00 2001 From: Christoph Kottke Date: Tue, 31 Jul 2018 13:07:31 +0200 Subject: [PATCH] update logging * aktivate verbose mode verbose messages are logged as the normal ones instead of being silently dropped * wxLogXXX from threads only the GUI wxApp called wxLog::FlushActive() in idle time. wxAppConsole doesn't show LogMessages from Threads. --- ircDDBGateway/IRCDDBGatewayAppD.cpp | 1 + ircDDBGateway/IRCDDBGatewayThread.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/ircDDBGateway/IRCDDBGatewayAppD.cpp b/ircDDBGateway/IRCDDBGatewayAppD.cpp index d0672c9..0132c92 100644 --- a/ircDDBGateway/IRCDDBGatewayAppD.cpp +++ b/ircDDBGateway/IRCDDBGatewayAppD.cpp @@ -182,6 +182,7 @@ bool CIRCDDBGatewayAppD::init() wxLog* log = new CLogger(m_logDir, logBaseName); wxLog::SetActiveTarget(log); + wxLog::SetVerbose(); } else { new wxLogNull; } diff --git a/ircDDBGateway/IRCDDBGatewayThread.cpp b/ircDDBGateway/IRCDDBGatewayThread.cpp index 917fb98..268a04d 100644 --- a/ircDDBGateway/IRCDDBGatewayThread.cpp +++ b/ircDDBGateway/IRCDDBGatewayThread.cpp @@ -405,6 +405,7 @@ void CIRCDDBGatewayThread::run() } } + wxLog::FlushActive(); ::wxMilliSleep(TIME_PER_TIC_MS); } }