diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2022-03-14 14:30:40 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-03-14 15:14:08 +0300 |
commit | c594e2c29630d16a43b10418a9d7d8b7deaa5c60 (patch) | |
tree | cb8d8fcbf6da9cd023ee965a9c6ab594de5bed36 | |
parent | 85db375b912c0ecd01f5fe9d9656745689b9ce2a (diff) |
Ensure to flush log when using stdout
Especially relevant for the cmd app.
-rw-r--r-- | changelog/unreleased/9515 | 5 | ||||
-rw-r--r-- | src/libsync/logger.cpp | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/changelog/unreleased/9515 b/changelog/unreleased/9515 new file mode 100644 index 000000000..e75aecf2b --- /dev/null +++ b/changelog/unreleased/9515 @@ -0,0 +1,5 @@ +Enhancement: Always flush log when logging to stdout + +We improved the behaviour of logging to a terminal. + +https://github.com/owncloud/client/pull/9515 diff --git a/src/libsync/logger.cpp b/src/libsync/logger.cpp index 0d57b3cd1..043b93148 100644 --- a/src/libsync/logger.cpp +++ b/src/libsync/logger.cpp @@ -145,8 +145,9 @@ void Logger::setLogFile(const QString &name) } bool openSucceeded = false; - if (name == QLatin1String("-")) { + if (name == QLatin1Char('-')) { attacheToConsole(); + setLogFlush(true); openSucceeded = _logFile.open(stdout, QIODevice::WriteOnly); } else { _logFile.setFileName(name); |