Closed AlekSi closed 3 months ago
Good idea!
I think disallowing global loggers in general might be a useful option, so we could implement it as something like no-global: all
(forbid global loggers) and no-global: default
(forbid the default logger). WDYT?
Sounds great!
@AlekSi Implemented as discussed. Will probably land in the next golangci-lint
release 👀
So, for example,
slog.Info
would be forbidden, butl := slog.New(…); l.Info
would be allowed.