Documentation
¶
Overview ¶
Package logger provides structured logging with levels.
Index ¶
- type Level
- type Logger
- func (l *Logger) Debug(msg string, fields ...map[string]interface{})
- func (l *Logger) Error(msg string, fields ...map[string]interface{})
- func (l *Logger) Fatal(msg string, fields ...map[string]interface{})
- func (l *Logger) Info(msg string, fields ...map[string]interface{})
- func (l *Logger) SetLevel(level Level)
- func (l *Logger) Warn(msg string, fields ...map[string]interface{})
- func (l *Logger) WithPrefix(prefix string) *Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a structured logger.
func Default ¶
func Default() *Logger
Default returns a default logger writing to stderr at Info level.
func (*Logger) WithPrefix ¶
WithPrefix returns a new logger with the given prefix.
Click to show internal directories.
Click to hide internal directories.