From a8a8f706eaf77ed512bf5480b07e50a1a81edacb Mon Sep 17 00:00:00 2001 From: Dmytro Leshchenko Date: Sun, 31 Mar 2024 20:27:04 +0200 Subject: [PATCH] Update time template --- examples/customlogger/main.go | 2 +- examples/logtofile/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/customlogger/main.go b/examples/customlogger/main.go index 29da55a..5013f1a 100644 --- a/examples/customlogger/main.go +++ b/examples/customlogger/main.go @@ -14,7 +14,7 @@ func main() { applicationLogger.Debug("This message will not be displayed, because there are no handlers registered.") - applicationFormatter := formatter.New("%(isotime) [%(level)] %(message)") + applicationFormatter := formatter.New("%(datetime) [%(level)] %(message)") consoleHandler := handler.NewConsoleHandler(level.Debug, level.Null, applicationFormatter) applicationLogger.AddHandler(consoleHandler) diff --git a/examples/logtofile/main.go b/examples/logtofile/main.go index 6d5db16..d831f4f 100644 --- a/examples/logtofile/main.go +++ b/examples/logtofile/main.go @@ -24,7 +24,7 @@ func main() { applicationLogger := logger.New("file-logger", time.RFC3339) - applicationFormatter := formatter.New("%(isotime) [%(level)] %(message)") + applicationFormatter := formatter.New("%(datetime) [%(level)] %(message)") fileHandler := handler.NewFileHandler(level.Warning, level.Null, applicationFormatter, fmt.Sprintf("%s/file.log", directory)) applicationLogger.AddHandler(fileHandler)