log

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: GPL-3.0 Imports: 5 Imported by: 106

Documentation

Index

Constants

View Source
const (
	PanicLevel = logrus.PanicLevel
	FatalLevel = logrus.FatalLevel
	ErrorLevel = logrus.ErrorLevel
	WarnLevel  = logrus.WarnLevel
	InfoLevel  = logrus.InfoLevel
	DebugLevel = logrus.DebugLevel
)

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, ctx ...interface{})

Debug logs a message at level Debug on the standard logger.

func Debugf

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

Debugf logs a message at level Debug on the standard logger.

func Debugln

func Debugln(args ...interface{})

Debugln logs a message at level Debug on the standard logger.

func Error

func Error(msg string, ctx ...interface{})

Error logs a message at level Error on the standard logger.

func Errorf

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

Errorf logs a message at level Error on the standard logger.

func Errorln

func Errorln(args ...interface{})

Errorln logs a message at level Error on the standard logger.

func Fatal

func Fatal(msg string, ctx ...interface{})

Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1.

func Fatalf

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

Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1.

func Fatalln

func Fatalln(args ...interface{})

Fatalln logs a message at level Fatal on the standard logger then the process will exit with status set to 1.

func GetLevel

func GetLevel() logrus.Level

GetLevel returns the logger level.

func Info

func Info(msg string, ctx ...interface{})

Info logs a message at level Info on the standard logger.

func Infof

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

Infof logs a message at level Info on the standard logger.

func Infoln

func Infoln(args ...interface{})

Infoln logs a message at level Info on the standard logger.

func Panic

func Panic(msg string, ctx ...interface{})

Panic logs a message at level Panic on the standard logger.

func Panicf

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

Panicf logs a message at level Panic on the standard logger.

func Panicln

func Panicln(args ...interface{})

Panicln logs a message at level Panic on the standard logger.

func Print

func Print(msg string, ctx ...interface{})

Print logs a message at level Info on the standard logger.

func Printf

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

Printf logs a message at level Info on the standard logger.

func Println

func Println(args ...interface{})

Println logs a message at level Info on the standard logger.

func SetFormatter

func SetFormatter(formatter logrus.Formatter)

SetFormatter sets the logger formatter.

func SetLevel

func SetLevel(level logrus.Level)

SetLevel sets the logger level.

func SetOutput

func SetOutput(output io.Writer)

SetOutput sets the logger output.

func ShowFilename

func ShowFilename()

ShowFilename show filename and position

func Warn

func Warn(msg string, ctx ...interface{})

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

func Warnf

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

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

func Warningf

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

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

func Warningln

func Warningln(args ...interface{})

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

func Warnln

func Warnln(args ...interface{})

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

Types

type Formatter

type Formatter = logrus.Formatter

type JSONFormatter

type JSONFormatter = logrus.JSONFormatter

type Level

type Level = logrus.Level

type Logger

type Logger struct {
	*logrus.Entry
	// contains filtered or unexported fields
}

func New

func New(ctx ...interface{}) *Logger

func Root

func Root() *Logger

func (*Logger) Debug

func (logger *Logger) Debug(msg string, args ...interface{})

Debug logs a message at level Debug on the standard logger.

func (*Logger) Error

func (logger *Logger) Error(msg string, args ...interface{})

Error logs a message at level Info on the standard logger.

func (*Logger) Fatal

func (logger *Logger) Fatal(msg string, args ...interface{})

Fatal logs a message at level Info on the standard logger.

func (*Logger) GetLevel

func (logger *Logger) GetLevel() logrus.Level

GetLevel returns the logger level.

func (*Logger) Info

func (logger *Logger) Info(msg string, args ...interface{})

Info logs a message at level Info on the standard logger.

func (*Logger) Panic

func (logger *Logger) Panic(msg string, args ...interface{})

Panic logs a message at level Info on the standard logger.

func (*Logger) Print

func (logger *Logger) Print(msg string, args ...interface{})

Print logs a message at level Info on the standard logger.

func (*Logger) SetFormatter

func (logger *Logger) SetFormatter(formatter Formatter)

SetFormatter sets the logger formatter.

func (*Logger) SetLevel

func (logger *Logger) SetLevel(level logrus.Level)

SetLevel sets the logger level.

func (*Logger) SetOutput

func (logger *Logger) SetOutput(output io.Writer)

SetOutput sets the logger output.

func (*Logger) ShowFilename

func (logger *Logger) ShowFilename()

ShowFilename show filename and position

func (*Logger) Warn

func (logger *Logger) Warn(msg string, args ...interface{})

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

type TextFormatter

type TextFormatter = logrus.TextFormatter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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