Skip to content

Add log.WithTimezone()

Nick Thomas requested to merge add-log-timezone-formatter into master

The default behaviour of labkit logging is to use the local timezone for log messages. However, gitlab-shell wants to use UTC in all cases.

Add a log.WithTimezone LoggerOption to allow configuring this behaviour.

We can see how gitlab-shell is configuring this at present here: https://gitlab.com/gitlab-org/gitlab-shell/-/blob/main/internal/logger/logger.go#L23 - I want to convert this to use labkit/log.Initialize.

Related to gitlab-shell#499 (closed)

Edited by Nick Thomas

Merge request reports