mirror of
https://github.com/YACReader/yacreader
synced 2025-05-25 18:00:46 -04:00
Fix QsLog setup in Library and LibraryServer
The calls changed, so we need to adapt them.
This commit is contained in:
parent
1568a5f253
commit
1af613663c
@ -147,11 +147,11 @@ int main(int argc, char **argv)
|
||||
logger.setLoggingLevel(QsLogging::ErrorLevel);
|
||||
#endif
|
||||
|
||||
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();
|
||||
@ -232,7 +232,9 @@ int main(int argc, char **argv)
|
||||
if (YACReaderLocalServer::isRunning()) //s<>lo se permite una instancia de YACReaderLibrary
|
||||
{
|
||||
QLOG_WARN() << "another instance of YACReaderLibrary is running";
|
||||
QsLogging::Logger::destroyInstance();
|
||||
#ifdef Q_OS_WIN
|
||||
logger.shutDownLoggerThread();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
QLOG_INFO() << "YACReaderLibrary starting";
|
||||
@ -267,8 +269,8 @@ int main(int argc, char **argv)
|
||||
localServer->close();
|
||||
delete localServer;
|
||||
delete mw;
|
||||
|
||||
QsLogging::Logger::destroyInstance();
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
logger.shutDownLoggerThread();
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
@ -149,11 +149,11 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
@ -188,7 +188,9 @@ int main(int argc, char **argv)
|
||||
if (YACReaderLocalServer::isRunning()) //s�lo se permite una instancia de YACReaderLibrary
|
||||
{
|
||||
QLOG_WARN() << "another instance of YACReaderLibrary is running";
|
||||
QsLogging::Logger::destroyInstance();
|
||||
#ifdef Q_OS_WIN
|
||||
logger.shutDownLoggerThread();
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
QLOG_INFO() << "YACReaderLibrary starting";
|
||||
@ -208,9 +210,9 @@ int main(int argc, char **argv)
|
||||
delete s;
|
||||
localServer->close();
|
||||
delete localServer;
|
||||
|
||||
QsLogging::Logger::destroyInstance();
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
logger.shutDownLoggerThread();
|
||||
#endif
|
||||
return ret;
|
||||
} else if (command == "create-library") {
|
||||
parser.clearPositionalArguments();
|
||||
|
Loading…
Reference in New Issue
Block a user