Skip to content

Simplify pkg/log, delete all features but log levels

Niels Möller requested to merge trim-log into main

Deletes the functions SetOutput, SetColor and SetDate. Users can still tweak output and date/time using corresponding features of the underlying standard library logger. The output format for date will be different, though. Before: "Tue, 13 Sep 2022 10:31:28 CEST", after: "2022/09/13 10:29:57".

The new version uses atomic operations to read and write the current log level in a thread safe manner; the previous version had a data race if the log level (or other properties) were changed at the same time as other go routines emit log messages.

Merge request reports