From 6f5bacabfdb44b1ec3d40754003e5e86e4160d78 Mon Sep 17 00:00:00 2001 From: xiphon Date: Wed, 4 Nov 2020 01:42:19 +0000 Subject: Logger: print to stdout till log file path gets initialized --- src/main/Logger.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/Logger.cpp') diff --git a/src/main/Logger.cpp b/src/main/Logger.cpp index 228679d5..62267eb6 100644 --- a/src/main/Logger.cpp +++ b/src/main/Logger.cpp @@ -117,13 +117,14 @@ Logger::Logger(QCoreApplication &parent, QString userDefinedLogFilePath) c.setGlobally(el::ConfigurationType::ToFile, "false"); c.setGlobally(el::ConfigurationType::ToStandardOutput, "true"); el::Loggers::setDefaultConfigurations(c, true); + qInstallMessageHandler(messageHandler); } void Logger::resetLogFilePath(bool portable) { m_logFilePath = QDir::toNativeSeparators(getLogPath(m_userDefinedLogFilePath, portable)); Monero::Wallet::init(m_applicationFilePath.c_str(), "monero-wallet-gui", m_logFilePath.toStdString(), true); - qInstallMessageHandler(messageHandler); + qWarning() << "Logging to" << m_logFilePath; emit logFilePathChanged(); } -- cgit v1.2.3