Repository navigation
Add UTC timestamp to log entries and clean up first log line - #140
Conversation
|
If we want wall time in the log entries again, include both - maybe something like ? For anything analyzing the timing between events (like stepper or scripts we might cook up for debugging), you need monotonic time - a clock that always ticks up, hopefully at a consistent rate. Wall time is unreliable - it can jump forward and backwards as NTP adjusts your system clock. And in many places, it teleports an hour twice a year due to time zone changes. I'm not particular about the format so long as monotonic time is there. |
updated |
| public sealed class UtcTimestampEnricher : ILogEventEnricher | ||
| { | ||
| public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory) => | ||
| logEvent.AddPropertyIfAbsent(new LogEventProperty("UtcTimestamp", | ||
| new ScalarValue(logEvent.Timestamp.UtcDateTime))); | ||
| } |
Changes log timestamp from
to
This helps correlate client and server logs, making it easier to match related events.
Fixes #138