Documentation ¶
Index ¶
- func Alert(message string)
- func Alertf(format string, args ...interface{})
- func Close() error
- func Critical(message string)
- func Criticalf(format string, args ...interface{})
- func Debug(message string)
- func Debugf(format string, args ...interface{})
- func Emergency(message string)
- func Emergencyf(format string, args ...interface{})
- func Error(message string)
- func Errorf(format string, args ...interface{})
- func GetLoggers() map[string]*Logger
- func Info(message string)
- func Infof(format string, args ...interface{})
- func Notice(message string)
- func Noticef(format string, args ...interface{})
- func RegisterLogger(name string, logger *Logger)
- func RegisterLoggers(loggers map[string]*Logger)
- func UnregisterLogger(name string)
- func UnregisterLoggers()
- func Warning(message string)
- func Warningf(format string, args ...interface{})
- type Formatter
- type FormatterOpt
- type Formatterable
- type Handler
- type HandlerOpt
- type Handlerable
- func (h *Handlerable) Close() error
- func (h *Handlerable) GetFormatter() Formatter
- func (h *Handlerable) GetLevel() logger.Level
- func (h *Handlerable) Handle(*Record) bool
- func (h *Handlerable) HandleBatch(records []*Record) bool
- func (h *Handlerable) IsHandling(record *Record) bool
- func (h *Handlerable) SetFormatter(formatter Formatter)
- func (h *Handlerable) SetLevel(level logger.Level)
- type HandlerableOpt
- type Logger
- type Opt
- type Processor
- type Record
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Emergencyf ¶ added in v0.4.0
func Emergencyf(format string, args ...interface{})
func GetLoggers ¶ added in v0.4.0
func RegisterLogger ¶ added in v0.4.0
func RegisterLoggers ¶ added in v0.4.0
func UnregisterLogger ¶ added in v0.4.0
func UnregisterLogger(name string)
func UnregisterLoggers ¶ added in v0.4.0
func UnregisterLoggers()
Types ¶
type FormatterOpt ¶
type FormatterOpt func(Formatter)
type Formatterable ¶
type Formatterable struct { }
type Handler ¶
type Handler interface { IsHandling(*Record) bool Handle(*Record) bool HandleBatch([]*Record) bool Close() error }
Handler is the interface that all handlers must implement.
type HandlerOpt ¶
type HandlerOpt func(Handler)
HandlerOpt is a function that can be used to configure a Handler.
type Handlerable ¶
type Handlerable struct {
// contains filtered or unexported fields
}
Handlerable is a struct that can be embedded in a Handler to provide
func NewHandlerable ¶
func NewHandlerable(opts ...HandlerableOpt) *Handlerable
func (*Handlerable) Close ¶ added in v0.6.0
func (h *Handlerable) Close() error
func (*Handlerable) GetFormatter ¶
func (h *Handlerable) GetFormatter() Formatter
func (*Handlerable) GetLevel ¶
func (h *Handlerable) GetLevel() logger.Level
func (*Handlerable) Handle ¶
func (h *Handlerable) Handle(*Record) bool
func (*Handlerable) HandleBatch ¶
func (h *Handlerable) HandleBatch(records []*Record) bool
func (*Handlerable) IsHandling ¶
func (h *Handlerable) IsHandling(record *Record) bool
func (*Handlerable) SetFormatter ¶
func (h *Handlerable) SetFormatter(formatter Formatter)
func (*Handlerable) SetLevel ¶
func (h *Handlerable) SetLevel(level logger.Level)
type HandlerableOpt ¶
type HandlerableOpt func(*Handlerable)
func WithFormatter ¶
func WithFormatter(formatter Formatter) HandlerableOpt
func WithLevel ¶
func WithLevel(level logger.Level) HandlerableOpt
type Logger ¶
type Logger struct { logger.Loggerable // contains filtered or unexported fields }
func (*Logger) Processors ¶
type Opt ¶
type Opt func(*Logger)
func WithChannel ¶
func WithHandler ¶
func WithHandlers ¶
func WithProcessor ¶
func WithProcessors ¶
func WithTimezone ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.