update time inmtervall for log
This commit is contained in:
parent
4e6dcb9895
commit
27792126a9
|
@ -40,7 +40,8 @@ public class CustomLogger : ILogger
|
||||||
File.Delete(logFiles.First());
|
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}");
|
var logFileBackupPath = Path.Combine(logFileDir, $"{logFileBaseName}_{DateTime.Now.ToUnixTime()}{logFileExt}");
|
||||||
File.AppendAllText(logFileBackupPath, timestamp + logMessage + Environment.NewLine);
|
File.AppendAllText(logFileBackupPath, timestamp + logMessage + Environment.NewLine);
|
||||||
|
|
Loading…
Reference in New Issue