Skip to content

Commit

Permalink
Merge pull request #6718 from nextcloud/ci/improveDevModeOnWindows
Browse files Browse the repository at this point in the history
improve logs when build with NEXTCLOUD_DEV enabled
  • Loading branch information
mgallien authored May 2, 2024
2 parents 75d0e9a + d0b4af6 commit 73c2f17
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@

#cmakedefine CFAPI_SHELL_EXTENSIONS_LIB_NAME "@CFAPI_SHELL_EXTENSIONS_LIB_NAME@"

#cmakedefine01 NEXTCLOUD_DEV

#endif
5 changes: 5 additions & 0 deletions src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,8 +699,13 @@ void Application::setupLogging()
logger->setLogDir(_logDir.isEmpty() ? ConfigFile().logDir() : _logDir);
}
logger->setLogExpire(_logExpire > 0 ? _logExpire : ConfigFile().logExpire());
#if defined NEXTCLOUD_DEV
logger->setLogFlush(true);
logger->setLogDebug(true);
#else
logger->setLogFlush(_logFlush || ConfigFile().logFlush());
logger->setLogDebug(_logDebug || ConfigFile().logDebug());
#endif
if (!logger->isLoggingToFile() && ConfigFile().automaticLogDir()) {
logger->setupTemporaryFolderLogDir();
}
Expand Down
2 changes: 1 addition & 1 deletion src/libsync/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString
{
static long long int linesCounter = 0;
const auto &msg = qFormatLogMessage(type, ctx, message);
#if defined(Q_OS_WIN) && defined(QT_DEBUG)
#if defined Q_OS_WIN && (defined NEXTCLOUD_DEV || defined QT_DEBUG)
// write logs to Output window of Visual Studio
{
QString prefix;
Expand Down

0 comments on commit 73c2f17

Please sign in to comment.