Documentation
¶
Index ¶
- Constants
- func Alert(msg string, args ...any)
- func Critical(msg string, args ...any)
- func Debug(msg string, args ...any)
- func Emergency(msg string, args ...any)
- func Error(msg string, args ...any)
- func Info(msg string, args ...any)
- func Notice(msg string, args ...any)
- func Print(msg string, args ...any)
- func SetDefaultLogger(config Config)
- func Warning(msg string, args ...any)
- type Config
- type Entry
- type Event
- func (event *Event) CreatedAt() time.Time
- func (event *Event) DeleteLabel(key string)
- func (event *Event) Done()
- func (event *Event) Label(key, value string)
- func (event *Event) Labels(fn func(key, value string))
- func (event *Event) Level() Level
- func (event *Event) Message() string
- func (event *Event) Name() string
- func (event *Event) String() string
- type Formatter
- type Level
- type Logger
- func (logger *Logger) Alert(msg string, args ...any) *Event
- func (logger *Logger) Critical(msg string, args ...any) *Event
- func (logger *Logger) Debug(msg string, args ...any) *Event
- func (logger *Logger) Emergency(msg string, args ...any) *Event
- func (logger *Logger) Error(msg string, args ...any) *Event
- func (logger *Logger) Event(level Level, msg string, args ...any) *Event
- func (logger *Logger) Flush(event *Event)
- func (logger *Logger) Info(msg string, args ...any) *Event
- func (logger *Logger) Level() Level
- func (logger *Logger) Notice(msg string, args ...any) *Event
- func (logger *Logger) Print(msg string, args ...any) *Event
- func (logger *Logger) String() string
- func (logger *Logger) Warning(msg string, args ...any) *Event
- type Writer
Constants ¶
View Source
const ( // LevelDefault means the log entry has no assigned severity level. LevelDefault = Level(0) // LevelDebug means debug or trace information. LevelDebug = Level(100) // LevelInfo means routine information, such as ongoing status or performance. LevelInfo = Level(200) // LevelNotice means normal but significant events, such as start up, shut down, or configuration. LevelNotice = Level(300) // LevelWarning means events that might cause problems. LevelWarning = Level(400) // LevelError means events that are likely to cause problems. LevelError = Level(500) // LevelCritical means events that cause more severe problems or brief outages. LevelCritical = Level(600) // LevelAlert means a person must take an action immediately. LevelAlert = Level(700) // LevelEmergency means one or more systems are unusable. LevelEmergency = Level(800) )
Variables ¶
This section is empty.
Functions ¶
func SetDefaultLogger ¶
func SetDefaultLogger(config Config)
Types ¶
type Entry ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) DeleteLabel ¶
type Formatter ¶
func GoogleCloudFormatter ¶
func GoogleCloudFormatter() Formatter
func SimpleFormatter ¶
func SimpleFormatter() Formatter
Click to show internal directories.
Click to hide internal directories.