logger

package
v0.0.0-...-89bec85 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Time_Stamp_Format = "2006-01-02 15:04:05"
)

Variables

View Source
var DefaultLogger *logger

Functions

func Debug

func Debug(args ...interface{})

func Debugf

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

func Debugln

func Debugln(args ...interface{})

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 Info

func Info(args ...interface{})

func Infof

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

func Infoln

func Infoln(args ...interface{})

func Panic

func Panic(args ...interface{})

func Panicf

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

func Panicln

func Panicln(args ...interface{})

func SetLevel

func SetLevel(level string) error

func SetLogDir

func SetLogDir(dir string, rotateNum int)

func SetReportCaller

func SetReportCaller(enable bool)

func Trace

func Trace(args ...interface{})

func Tracef

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

func Traceln

func Traceln(args ...interface{})

func Warn

func Warn(args ...interface{})

func Warnf

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

func Warnln

func Warnln(args ...interface{})

Types

type GetCallerHook

type GetCallerHook struct {
	Field  string
	KipPkg string
	Debug  bool
	// contains filtered or unexported fields
}

This method may lead to system crash in the case of concurrency. Please use it with caution or Control caller level;set config LogLevelReportCaller Get Caller hook

func (*GetCallerHook) Fire

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

Fire implement fire

func (GetCallerHook) GetKipPkg

func (hook GetCallerHook) GetKipPkg() string

func (*GetCallerHook) Levels

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

Levels implement levels

func (GetCallerHook) SetDebug

func (hook GetCallerHook) SetDebug(debug bool)

func (GetCallerHook) SetKipPkg

func (hook GetCallerHook) SetKipPkg(args ...string)

Jump to

Keyboard shortcuts

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