Documentation ¶
Index ¶
Constants ¶
View Source
const ( LevelEmergency = iota // 0 LevelAlert // 1 LevelCritical // 2 LevelError // 3 LevelWarning // 4 LevelNotice // 5 LevelInformational // 6 LevelDebug // 7 )
RFC5424 log message levels.
View Source
const ( LevelWarn = LevelWarning // 4 LevelInfo = LevelInformational // 6 LevelTrace = LevelDebug // 7 )
Legacy log level constants to ensure backwards compatibility.
Variables ¶
Functions ¶
Types ¶
type Config ¶
type Config struct { Name string `json:"name" toml:"name"` Adapter string `json:"adapter" toml:"adapter"` Async bool `json:"async" toml:"async"` Level uint8 `json:"level" toml:"level"` Caller bool `json:"caller" toml:"caller"` CallDepth int `json:"call_depth" toml:"call_depth"` Option map[string]string `json:"option" toml:"option"` }
type Writer ¶
type Writer interface { io.WriteCloser Println(v ...any) // Emergency Log EMERGENCY level message. Emergency(v ...any) // Alert Log ALERT level message. Alert(v ...any) // Critical Log CRITICAL level message. Critical(v ...any) // Error Log ERROR level message. Error(v ...any) // Warning Log WARNING level message. Warning(v ...any) // Notice Log NOTICE level message. Notice(v ...any) // Informational Log INFORMATIONAL level message. Informational(v ...any) // Debug Log DEBUG level message. Debug(v ...any) // Warn Log WARN level message. // compatibility alias for Warning() Warn(v ...any) // Info Log INFO level message. // compatibility alias for Informational() Info(v ...any) // Trace Log TRACE level message. // compatibility alias for Debug() Trace(v ...any) }
Click to show internal directories.
Click to hide internal directories.