Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDefaultWriterHooks ¶
func AddHooks ¶
func AddHooks(hooks ...*WriterHook)
AddHooks adds hooks to send logs to different destinations depending on level
Types ¶
type WriterHook ¶
WriterHook is a hook that writes logs of specified LogLevels to specified Writer
func (*WriterHook) Fire ¶
func (hook *WriterHook) Fire(entry *logrus.Entry) error
Fire will be called when some logging function is called with current hook It will format log entry to string and write it to appropriate writer
func (*WriterHook) Levels ¶
func (hook *WriterHook) Levels() []logrus.Level
Levels define on which log levels this hook would trigger
Click to show internal directories.
Click to hide internal directories.