Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FormatterHook ¶
type FormatterHook struct {
Writer io.Writer
LogLevels []log.Level
Formatter log.Formatter
DefaultFields log.Fields
}
FormatterHook is a hook that writes logs of specified LogLevels with a formatter to specified Writer
func (*FormatterHook) Fire ¶
func (hook *FormatterHook) Fire(entry *log.Entry) error
Fire will be called when some logging function is called with current hook It will format log entry and write it to appropriate writer
func (*FormatterHook) Levels ¶
func (hook *FormatterHook) Levels() []log.Level
Levels define on which log levels this hook would trigger
Click to show internal directories.
Click to hide internal directories.