chore: add go config and logging layer

This commit is contained in:
Philipp
2026-06-10 14:56:03 +02:00
parent e4bfc62c18
commit 2112821f79
12 changed files with 265 additions and 30 deletions
+17
View File
@@ -0,0 +1,17 @@
package logging
import (
"log/slog"
"os"
)
func New(service string, appEnv string, level slog.Level) *slog.Logger {
handler := slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{
Level: level,
})
return slog.New(handler).With(
"service", service,
"env", appEnv,
)
}