Set default file log size to 65 KiB and delete backup logs older than 1 month.

This commit is contained in:
sledgehammer999 2018-01-25 03:45:32 +02:00
parent d6cea2f76d
commit 024df8c53f
No known key found for this signature in database
GPG key ID: 6E4A2D025B7CC9A2
5 changed files with 20 additions and 23 deletions

View file

@ -135,7 +135,7 @@ void FileLogger::addLogMessage(const Log::Msg &msg)
str << QDateTime::fromMSecsSinceEpoch(msg.timestamp).toString(Qt::ISODate) << " - " << msg.message << endl;
if (m_backup && (m_logFile->size() >= (m_maxSize * 1024 * 1024))) {
if (m_backup && (m_logFile->size() >= m_maxSize)) {
closeLogFile();
int counter = 0;
QString backupLogFilename = m_path + ".bak";