logrus: github.com/sirupsen/logrus/hooks/writer Index | Files

package writer

import "github.com/sirupsen/logrus/hooks/writer"

Index

Package Files

writer.go

type Hook Uses

type Hook struct {
    Writer    io.Writer
    LogLevels []log.Level
}

Hook is a hook that writes logs of specified LogLevels to specified Writer

func (*Hook) Fire Uses

func (hook *Hook) Fire(entry *log.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 (*Hook) Levels Uses

func (hook *Hook) Levels() []log.Level

Levels define on which log levels this hook would trigger

Package writer imports 2 packages (graph). Updated 2020-03-04. Refresh now. Tools for package owners.