From 8fe1326350f734a6518d6c61aeaee8c16f2d0fa0 Mon Sep 17 00:00:00 2001 From: daniel fusser Date: Mon, 28 Aug 2023 22:15:32 +0200 Subject: [PATCH] add source in logs --- log.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/log.go b/log.go index 59cae34..1c5b312 100644 --- a/log.go +++ b/log.go @@ -20,6 +20,10 @@ func init() { tint.NewHandler(os.Stderr, &tint.Options{ Level: LogLvl, TimeFormat: time.DateTime, + AddSource: true, + ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr { + return a + }, }), )