(fix): observer lifecycle
Golang lint / lint (push) Successful in 1m5s

(tests): webhook runtime

(doc): logger options
This commit is contained in:
2026-04-29 13:11:54 +03:00
parent 667fa3cc61
commit 4807dec6ae
8 changed files with 127 additions and 7 deletions
+5 -2
View File
@@ -6,10 +6,13 @@ import (
"git.scuroneko.dev/scuroneko/sneklog/v2"
)
// LogFormat selects the writer format used by framework loggers.
type LogFormat string
const (
// LogFormatText writes human-readable text logs.
LogFormatText LogFormat = "text"
// LogFormatJSON writes structured JSON logs.
LogFormatJSON LogFormat = "json"
)
@@ -22,8 +25,8 @@ func GetLoggerLevel() sneklog.LogLevel {
return level
}
// CreateLogger creates a logger with the shared default policy:
// JSON stdout output, provided prefix, and provided level.
// CreateLogger creates a logger with stdout output, the provided name, level,
// format, and optional formatter.
func CreateLogger(
name string, level sneklog.LogLevel,
format LogFormat, formatter *sneklog.Formatter,