Ensure we are closing current log file before entering next log file

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-04-13 18:49:48 +08:00 committed by Matthieu Gallien
parent 38ae92beff
commit 711359ef43

View file

@ -119,6 +119,7 @@ void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString
#endif #endif
{ {
if (_logFile.size() >= MaxLogSizeBytes) { if (_logFile.size() >= MaxLogSizeBytes) {
close();
enterNextLogFile(); enterNextLogFile();
} }