Compare commits

..

2 Commits

Author SHA1 Message Date
atef 4d0d2e1404 Merge remote-tracking branch 'origin/main' 2024-06-21 15:37:17 +02:00
atef 27792126a9 update time inmtervall for log 2024-06-21 15:36:49 +02:00
1 changed files with 2 additions and 1 deletions

View File

@ -40,7 +40,8 @@ public class CustomLogger : ILogger
File.Delete(logFiles.First());
}
var timestamp = "Timestamp;" + DateTime.Now.ToUnixTime() + Environment.NewLine;
var roundedUnixTimestamp = DateTime.Now.ToUnixTime() % 2 == 0 ? DateTime.Now.ToUnixTime() : DateTime.Now.ToUnixTime() + 1;
var timestamp = "Timestamp;" + roundedUnixTimestamp + Environment.NewLine;
var logFileBackupPath = Path.Combine(logFileDir, $"{logFileBaseName}_{DateTime.Now.ToUnixTime()}{logFileExt}");
File.AppendAllText(logFileBackupPath, timestamp + logMessage + Environment.NewLine);