log

package
v0.0.0-...-ee99c87 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2018 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallerHook

type CallerHook struct {
}

CallerHook a caller hook of logrus

func (*CallerHook) Fire

func (hook *CallerHook) Fire(entry *logrus.Entry) error

Fire adds a callers field in logger instance

func (*CallerHook) Levels

func (hook *CallerHook) Levels() []logrus.Level

Levels returns support levels

type SeeleLog

type SeeleLog struct {
	// contains filtered or unexported fields
}

SeeleLog wrapped log class

func GetLogger

func GetLogger(logName string, bConsole bool) *SeeleLog

GetLogger get logrus.Logger object accoring to logName each module can have it's own logger

func (*SeeleLog) Debug

func (p *SeeleLog) Debug(format string, args ...interface{})

Debug Level. Usually only enabled when debugging. Very verbose logging.

func (*SeeleLog) Error

func (p *SeeleLog) Error(format string, args ...interface{})

Error Level. Logs. Used for errors that should definitely be noted. Commonly used for hooks to send errors to an error tracking service.

func (*SeeleLog) Fatal

func (p *SeeleLog) Fatal(format string, args ...interface{})

Fatal Level. Logs and then calls `os.Exit(1)`. It will exit even if the logging level is set to Panic.

func (*SeeleLog) Info

func (p *SeeleLog) Info(format string, args ...interface{})

Info Level. General operational entries about what's going on inside the application.

func (*SeeleLog) Panic

func (p *SeeleLog) Panic(format string, args ...interface{})

Panic Level, highest level of severity. Logs and then calls panic with the message passed to Debug, Info, ...

func (*SeeleLog) Warn

func (p *SeeleLog) Warn(format string, args ...interface{})

Warn Level. Non-critical entries that deserve eyes.

Jump to

Keyboard shortcuts

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