Skip to content

Commit

Permalink
Revert "Enter next log file if the current log file is larger than 51…
Browse files Browse the repository at this point in the history
…2 KB when writing log line"

This reverts commit 3124d38.
  • Loading branch information
mgallien committed Apr 19, 2023
1 parent 206215c commit 112a0ad
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/libsync/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

namespace {
constexpr int CrashLogSize = 20;
constexpr int MaxLogSizeBytes = 1024 * 512;
}
namespace OCC {

Expand Down Expand Up @@ -118,14 +117,9 @@ void Logger::doLog(QtMsgType type, const QMessageLogContext &ctx, const QString
cout << msg << endl;
#endif
{
if (_logFile.size() >= MaxLogSizeBytes) {
enterNextLogFile();
}

QMutexLocker lock(&_mutex);
_crashLogIndex = (_crashLogIndex + 1) % CrashLogSize;
_crashLog[_crashLogIndex] = msg;

if (_logstream) {
(*_logstream) << msg << Qt::endl;
if (_doFileFlush)
Expand Down

0 comments on commit 112a0ad

Please sign in to comment.