remove source logging because it annoys me

This commit is contained in:
Adora Laura Kalb 2024-07-11 16:10:34 +02:00
parent 7c7fe0ba7c
commit 8ff8a63299
Signed by: adoralaura
SSH key fingerprint: SHA256:3XrkbR8ikAZJVtYfaUliX1MhmJYVAe/ocIb/MiDHBJ8

View file

@ -10,11 +10,9 @@ import (
func InitializeLogger() *slog.Logger {
logLevel := slog.LevelInfo
sourceLogging := false
if configuration.VerboseLogging {
logLevel = slog.LevelDebug
sourceLogging = true
}
if configuration.QuietLogging {
logLevel = slog.LevelError
@ -24,8 +22,7 @@ func InitializeLogger() *slog.Logger {
}
opts := &slog.HandlerOptions{
Level: logLevel,
AddSource: sourceLogging,
Level: logLevel,
}
handler := slog.NewTextHandler(os.Stdout, opts)