MCPcopy
hub / github.com/sirupsen/logrus / StdLogger

Interface StdLogger

logrus.go:126–138  ·  logrus.go::StdLogger

StdLogger is what your logrus-enabled library should take, that way it'll accept a stdlib logger ([log.Logger]) and a logrus logger. There's no standard interface, so this is the closest we get, unfortunately.

Source from the content-addressed store, hash-verified

124// it'll accept a stdlib logger ([log.Logger]) and a logrus logger.
125// There's no standard interface, so this is the closest we get, unfortunately.
126type StdLogger interface {
127 Print(...interface{})
128 Printf(string, ...interface{})
129 Println(...interface{})
130
131 Fatal(...interface{})
132 Fatalf(string, ...interface{})
133 Fatalln(...interface{})
134
135 Panic(...interface{})
136 Panicf(string, ...interface{})
137 Panicln(...interface{})
138}
139
140// FieldLogger extends the [StdLogger] interface, generalizing
141// the [Entry] and [Logger] types.

Callers 39

TestHookFiresFunction · 0.65
TestHookCanModifyEntryFunction · 0.65
TestCanFireMultipleHooksFunction · 0.65
TestPrintFunction · 0.65
PrintMethod · 0.65
PrintFnMethod · 0.65
PrintfMethod · 0.65
PrintfFunction · 0.65
CrossBuildFunction · 0.65
TestFieldValueErrorFunction · 0.65

Implementers 2

Loggerlogger.go
Entryentry.go

Calls

no outgoing calls

Tested by

no test coverage detected