We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c74094b commit e6b3a5dCopy full SHA for e6b3a5d
logging/logging.go
@@ -54,6 +54,12 @@ func Configure() {
54
logTypeAsString := os.Getenv(GatusConfigLogTypeEnvVar)
55
switch logTypeAsString {
56
case "", "TEXT":
57
+ logHandlerOptions.ReplaceAttr = func(groups []string, a slog.Attr) slog.Attr {
58
+ if a.Key == "time" {
59
+ a.Value = slog.StringValue(a.Value.Time().Format("2006-01-02|15:04:05"))
60
+ }
61
+ return a
62
63
slog.SetDefault(slog.New(slog.NewTextHandler(os.Stdout, logHandlerOptions)))
64
slog.Info("Log type set", "type", logTypeAsString)
65
case "JSON":
0 commit comments