Skip to content

Commit

Permalink
enable debug logs in debug builds
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien committed Sep 12, 2023
1 parent afeca8e commit 834f70f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,12 @@ void Application::setupLogging()
logger->setLogExpire(_logExpire > 0 ? _logExpire : ConfigFile().logExpire());
logger->setLogFlush(_logFlush || ConfigFile().logFlush());
logger->setLogDebug(_logDebug || ConfigFile().logDebug());

#if defined(QT_DEBUG)
logger->setLogDebug(true);
logger->setLogFlush(true);
#endif

if (!logger->isLoggingToFile() && ConfigFile().automaticLogDir()) {
logger->setupTemporaryFolderLogDir();
}
Expand Down
4 changes: 4 additions & 0 deletions src/libsync/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ Logger::Logger(QObject *parent)
Logger::instance()->doLog(type, ctx, message);
});
#endif
#if defined(QT_DEBUG)
setLogDebug(true);
setLogFlush(true);
#endif
}

Logger::~Logger()
Expand Down

0 comments on commit 834f70f

Please sign in to comment.