From 3eeee1b08d31f3f3c2064d89f9b2f46628644a5a Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 2 Feb 2016 12:16:29 -0500 Subject: [PATCH] set correct log level for console --- Daemon.cpp | 4 +++- Log.h | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Daemon.cpp b/Daemon.cpp index 08f93572..7da64883 100644 --- a/Daemon.cpp +++ b/Daemon.cpp @@ -153,7 +153,9 @@ namespace i2p } StartLog (logfile); } - g_Log->SetLogLevel(loglevel); + else + StartLog (""); + SetLogLevel(loglevel); bool http; i2p::config::GetOption("http.enabled", http); if (http) { diff --git a/Log.h b/Log.h index c4b0f276..f941e6a7 100644 --- a/Log.h +++ b/Log.h @@ -95,6 +95,12 @@ inline void StopLog () } } +inline void SetLogLevel (const std::string& level) +{ + if (g_Log) + g_Log->SetLogLevel(level); +} + template void LogPrint (std::stringstream& s, TValue arg) {