Skip to content

Commit

Permalink
Update time template
Browse files Browse the repository at this point in the history
  • Loading branch information
dl1998 committed Mar 31, 2024
1 parent d268c35 commit a8a8f70
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/customlogger/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion examples/logtofile/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a8a8f70

Please sign in to comment.