Documentation ¶
Index ¶
- Constants
- func AddHook(hook logrus.Hook)
- func CloseFile() error
- func CustomWriterLevel(level logrus.Level, maxScanTokenSize int) *io.PipeWriter
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func GetLevel() logrus.Level
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func OpenFile(path string) error
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func RotateFile() error
- func SetFormatter(formatter logrus.Formatter)
- func SetLevel(level logrus.Level)
- func SetLogger(l Logger)
- func SetOutput(out io.Writer)
- func Str(key, value string) func(logrus.Fields)
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
- func With(ctx context.Context, opts ...func(logrus.Fields)) context.Context
- type Logger
Constants ¶
const ( EntryPointName = "entryPointName" RouterName = "routerName" Rule = "rule" MiddlewareName = "middlewareName" MiddlewareType = "middlewareType" ProviderName = "providerName" ServiceName = "serviceName" MetricsProviderName = "metricsProviderName" TracingProviderName = "tracingProviderName" ServerName = "serverName" )
Log entry name
Variables ¶
This section is empty.
Functions ¶
func CustomWriterLevel ¶
func CustomWriterLevel(level logrus.Level, maxScanTokenSize int) *io.PipeWriter
CustomWriterLevel logs writer for a specific level. (with a custom scanner buffer size.) adapted from github.com/Sirupsen/logrus/writer.go
func Debug ¶
func Debug(args ...interface{})
Debug logs a message at level Debug on the standard logger. Deprecated
func Debugf ¶
func Debugf(format string, args ...interface{})
Debugf logs a message at level Debug on the standard logger. Deprecated
func Error ¶
func Error(args ...interface{})
Error logs a message at level Error on the standard logger. Deprecated
func Errorf ¶
func Errorf(format string, args ...interface{})
Errorf logs a message at level Error on the standard logger. Deprecated
func Fatal ¶
func Fatal(args ...interface{})
Fatal logs a message at level Fatal on the standard logger. Deprecated
func Fatalf ¶
func Fatalf(format string, args ...interface{})
Fatalf logs a message at level Fatal on the standard logger. Deprecated
func Info ¶
func Info(args ...interface{})
Info logs a message at level Info on the standard logger. Deprecated
func Infof ¶
func Infof(format string, args ...interface{})
Infof logs a message at level Info on the standard logger. Deprecated
func Panic ¶
func Panic(args ...interface{})
Panic logs a message at level Panic on the standard logger. Deprecated
func Panicf ¶
func Panicf(format string, args ...interface{})
Panicf logs a message at level Panic on the standard logger. Deprecated
func RotateFile ¶
func RotateFile() error
RotateFile closes and reopens the log file to allow for rotation by an external source. If the log isn't backed by a file then it does nothing.
func SetFormatter ¶
SetFormatter sets the standard logger formatter.
func Warn ¶
func Warn(args ...interface{})
Warn logs a message at level Warn on the standard logger. Deprecated
Types ¶
type Logger ¶
type Logger interface { logrus.FieldLogger WriterLevel(logrus.Level) *io.PipeWriter }
Logger the Traefik logger
func FromContext ¶
FromContext Gets the logger from context