mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:03:55 +02:00
change type of MAX_LOG_SIZE rather than cast its only use
This commit is contained in:
parent
61c9da1d27
commit
414d9162ef
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ static const QString FILENAME_FORMAT = "hifi-log_%1_%2.txt";
|
|||
static const QString DATETIME_FORMAT = "yyyy-MM-dd_hh.mm.ss";
|
||||
static const QString LOGS_DIRECTORY = "Logs";
|
||||
// Max log size is 1 MB
|
||||
static const uint64_t MAX_LOG_SIZE = 1024 * 1024;
|
||||
static const qint64 MAX_LOG_SIZE = 1024 * 1024;
|
||||
// Max log age is 1 hour
|
||||
static const uint64_t MAX_LOG_AGE_USECS = USECS_PER_SECOND * 3600;
|
||||
|
||||
|
@ -53,7 +53,7 @@ public:
|
|||
protected:
|
||||
void rollFileIfNecessary(QFile& file) {
|
||||
uint64_t now = usecTimestampNow();
|
||||
if ((file.size() > (qint64)MAX_LOG_SIZE) || (now - _lastRollTime) > MAX_LOG_AGE_USECS) {
|
||||
if ((file.size() > MAX_LOG_SIZE) || (now - _lastRollTime) > MAX_LOG_AGE_USECS) {
|
||||
QString newFileName = getLogRollerFilename();
|
||||
if (file.copy(newFileName)) {
|
||||
_lastRollTime = now;
|
||||
|
|
Loading…
Reference in a new issue