Merge pull request #634 from linkmauve/logging-performances

Apply the logging filter before sending the message to the queue
This commit is contained in:
bunnei 2015-03-09 15:42:18 -04:00
commit 3da94a597b
7 changed files with 21 additions and 9 deletions

View file

@ -316,7 +316,8 @@ int __cdecl main(int argc, char* argv[])
{
std::shared_ptr<Log::Logger> logger = Log::InitGlobalLogger();
Log::Filter log_filter(Log::Level::Info);
std::thread logging_thread(Log::TextLoggingLoop, logger, &log_filter);
Log::SetFilter(&log_filter);
std::thread logging_thread(Log::TextLoggingLoop, logger);
SCOPE_EXIT({
logger->Close();
logging_thread.join();