feat: standardises the v2 log setup to emit UTC-based timezones

When attempting to roll this out to gitlab-shell, we noticed that there was a discrepancy with the timestamp. Firstly, it was in nanosecond format and secondly, it wasn't set by default to UTC.

Slog Context

The go slog lib relies on time. Now in order to create records. We had the option to have the consumers of this lib set the appropriate time on startup, or to default to UTC - given the current Logrus behaviour is to default to UTC, it makes more sense for the library to own this logic.

In order to change this, we need to override the handler ReplaceAttr function which then allows us to say "hey, if we're dealing with the timekey, let's ensure we default to UTC".

Edited by Elliot Forbes

Merge request reports

Loading