do not force a flush every time a log line is added to a file to speed
up the logging process
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Logger::~Logger()
{
+ if (_logstream) {
+ _logstream->flush();
+ }
#ifndef NO_MSG_HANDLER
qInstallMessageHandler(nullptr);
#endif
if (linesCounter >= MaxLogLinesCount) {
linesCounter = 0;
+ if (_logstream) {
+ _logstream->flush();
+ }
closeNoLock();
enterNextLogFileNoLock();
}
_crashLog[_crashLogIndex] = msg;
if (_logstream) {
- (*_logstream) << msg << Qt::endl;
+ (*_logstream) << msg << "\n";
if (_doFileFlush)
_logstream->flush();
}