From ac4d2f4804f4b101ba55ba947ae169f4fb7a6949 Mon Sep 17 00:00:00 2001 From: Felix Kauselmann Date: Sat, 25 Jul 2020 20:00:32 +0200 Subject: [PATCH] Fix QsLog integration in reader too. --- YACReader/main.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/YACReader/main.cpp b/YACReader/main.cpp index a67cbc62..3236ea6f 100644 --- a/YACReader/main.cpp +++ b/YACReader/main.cpp @@ -104,11 +104,11 @@ int main(int argc, char *argv[]) Logger &logger = Logger::instance(); logger.setLoggingLevel(QsLogging::InfoLevel); - DestinationPtr fileDestination(DestinationFactory::MakeFileDestination( - destLog, EnableLogRotation, MaxSizeBytes(1048576), MaxOldLogCount(2))); - DestinationPtr debugDestination(DestinationFactory::MakeDebugOutputDestination()); - logger.addDestination(debugDestination); - logger.addDestination(fileDestination); + DestinationPtrU fileDestination(DestinationFactory::MakeFileDestination( + destLog, LogRotationOption::EnableLogRotation, MaxSizeBytes(1048576), MaxOldLogCount(2))); + DestinationPtrU debugDestination(DestinationFactory::MakeDebugOutputDestination()); + logger.addDestination(std::move(debugDestination)); + logger.addDestination(std::move(fileDestination)); QTranslator translator; QString sufix = QLocale::system().name(); @@ -137,5 +137,8 @@ int main(int argc, char *argv[]) //Configuration::getConfiguration().save(); YACReader::exitCheck(ret); +#ifdef Q_OS_WIN + logger.shutDownLoggerThread(); +#endif return ret; }