log

package
v2.0.0-alpha2+incompat... Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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 AddHook

func AddHook(hook logrus.Hook)

AddHook adds a hook to the standard logger hooks.

func CloseFile

func CloseFile() error

CloseFile closes the log and sets the Output to stdout

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 GetLevel

func GetLevel() logrus.Level

GetLevel returns the standard logger level.

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 OpenFile

func OpenFile(path string) error

OpenFile opens the log file using the specified path

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

func SetFormatter(formatter logrus.Formatter)

SetFormatter sets the standard logger formatter.

func SetLevel

func SetLevel(level logrus.Level)

SetLevel sets the standard logger level.

func SetLogger

func SetLogger(l Logger)

SetLogger sets the logger.

func SetOutput

func SetOutput(out io.Writer)

SetOutput sets the standard logger output.

func Str

func Str(key, value string) func(logrus.Fields)

Str adds a string field

func Warn

func Warn(args ...interface{})

Warn logs a message at level Warn on the standard logger. Deprecated

func Warnf

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

Warnf logs a message at level Warn on the standard logger. Deprecated

func With

func With(ctx context.Context, opts ...func(logrus.Fields)) context.Context

With Adds fields

Types

type Logger

type Logger interface {
	logrus.FieldLogger
	WriterLevel(logrus.Level) *io.PipeWriter
}

Logger the Traefik logger

func FromContext

func FromContext(ctx context.Context) Logger

FromContext Gets the logger from context

func WithoutContext

func WithoutContext() Logger

WithoutContext Gets the main logger

Jump to

Keyboard shortcuts

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