Add environment config loading and logging setup

This commit is contained in:
2026-09-21 18:47:58 +02:00
parent abb674aff1
commit 1c9e8afd78
2 changed files with 66 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
package logging
import (
"log/slog"
"os"
)
func New(debug bool) *slog.Logger {
level := slog.LevelInfo
if debug {
level = slog.LevelDebug
}
handler := slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{Level: level})
return slog.New(handler)
}