Documentation
¶
Index ¶
- type Context
- type LevelType
- type Logger
- type LoggerAware
- type Nop
- func (Nop) Debug(message string, options ...Option)
- func (Nop) Error(message string, options ...Option)
- func (Nop) Fatal(message string, options ...Option)
- func (Nop) Info(message string, options ...Option)
- func (Nop) Log(level LevelType, message string, options ...Option)
- func (Nop) Panic(message string, options ...Option)
- func (Nop) Trace(message string, options ...Option)
- func (Nop) Warning(message string, options ...Option)
- type Option
- type Standard
- func (l *Standard) Debug(message string, options ...Option)
- func (l *Standard) Error(message string, options ...Option)
- func (l *Standard) Fatal(message string, options ...Option)
- func (l *Standard) Info(message string, options ...Option)
- func (l *Standard) Log(level LevelType, message string, options ...Option)
- func (l *Standard) Panic(message string, options ...Option)
- func (l *Standard) Trace(message string, options ...Option)
- func (l *Standard) Warning(message string, options ...Option)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LevelType ¶
type LevelType int
LevelType type.
type Logger ¶
type Logger interface { // Log with an arbitrary level. Log(level LevelType, message string, options ...Option) Panic(message string, options ...Option) Fatal(message string, options ...Option) Error(message string, options ...Option) Warning(message string, options ...Option) Info(message string, options ...Option) Debug(message string, options ...Option) Trace(message string, options ...Option) }
Logger describes a logger instance.
type LoggerAware ¶
type LoggerAware interface {
SetLogger(logger Logger)
}
LoggerAware describes a logger-aware instance.
type Option ¶
type Option func(*Context)
func WithFormat ¶
func WithFormat(formats ...interface{}) Option
WithFormat add formats args to logger.Context.
func WithLabels ¶
WithLabels add labels to logger.Context.
Click to show internal directories.
Click to hide internal directories.