Severity: Info
File: src/Servy.Core/Logging/Logger.cs, line 304
Description:
Log entry timestamps always use DateTime.Now (local time):
$"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}]"
If useLocalTimeForRotation is false (UTC mode), log rotation uses UTC but log entries are stamped in local time. This mismatch means a rotation at midnight UTC appears to happen at a different time than the last logged entry before it, confusing log analysis.
Suggested fix:
Use DateTime.UtcNow when _useLocalTimeForRotation is false, consistent with the rotation logic.
Severity: Info
File:
src/Servy.Core/Logging/Logger.cs, line 304Description:
Log entry timestamps always use
DateTime.Now(local time):$"[{DateTime.Now:yyyy-MM-dd HH:mm:ss}]"If
useLocalTimeForRotationis false (UTC mode), log rotation uses UTC but log entries are stamped in local time. This mismatch means a rotation at midnight UTC appears to happen at a different time than the last logged entry before it, confusing log analysis.Suggested fix:
Use
DateTime.UtcNowwhen_useLocalTimeForRotationis false, consistent with the rotation logic.