customLog

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(args ...interface{})

func ErrorF

func ErrorF(format string, args ...interface{})

func ErrorLn

func ErrorLn(args ...interface{})

func Fatal

func Fatal(args ...interface{})

func FatalF

func FatalF(format string, args ...interface{})

func FatalLn

func FatalLn(args ...interface{})

func InfoF

func InfoF(format string, args ...interface{})

func InfoLn

func InfoLn(args ...interface{})

func InitializeLogging

func InitializeLogging(accessLogFile, errorLogFile string) error

func OpenFile

func OpenFile(logFile string) (*os.File, error)

func Warn

func Warn(args ...interface{})

func WarnF

func WarnF(format string, args ...interface{})

func WarnLn

func WarnLn(args ...interface{})

Types

type WriterHook

type WriterHook struct {
	Writer    io.Writer
	LogLevels []logrus.Level
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL