From 4be84c6845dae91688a30cd25d19fb5d38f66170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Tue, 22 May 2018 18:16:55 +0200 Subject: [PATCH] Set TraceLevel for logging only in debug builds. --- YACReaderLibrary/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/YACReaderLibrary/main.cpp b/YACReaderLibrary/main.cpp index 5eac3207..df83c1b1 100644 --- a/YACReaderLibrary/main.cpp +++ b/YACReaderLibrary/main.cpp @@ -101,7 +101,11 @@ int main( int argc, char ** argv ) QDir().mkpath(YACReader::getSettingsPath()); Logger& logger = Logger::instance(); +#ifdef QT_DEBUG logger.setLoggingLevel(QsLogging::TraceLevel); +#else + logger.setLoggingLevel(QsLogging::ErrorLevel); +#endif DestinationPtr fileDestination(DestinationFactory::MakeFileDestination( destLog, EnableLogRotation, MaxSizeBytes(1048576), MaxOldLogCount(2)));