fix
This commit is contained in:
parent
107b8f3050
commit
1004333534
|
@ -10,11 +10,14 @@ import (
|
|||
|
||||
// LogFormatter is a function type that formats a LogEvent into a string.
|
||||
// Example:
|
||||
// formatter := func(event LogEvent) string {
|
||||
// return fmt.Sprintf("[%s] %s: %v", event.Ts.Format("2006-01-02"), event.Level, event.Data)
|
||||
// }
|
||||
//
|
||||
// formatter := func(event LogEvent) string {
|
||||
// return fmt.Sprintf("[%s] %s: %v", event.Ts.Format("2006-01-02"), event.Level, event.Data)
|
||||
// }
|
||||
type LogFormatter = func(LogEvent) string
|
||||
|
||||
const logTemplate = "[%s] %s : %s - %s\n"
|
||||
|
||||
// format is the default formatter that converts a LogEvent to a string using the default template.
|
||||
// It handles both simple values and formatted strings.
|
||||
// Template: "[timestamp] level : category - data"
|
||||
|
|
Loading…
Reference in New Issue