log

package
v0.0.0-...-c5bcced Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

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(v ...interface{})

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

func Debugf

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

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

func Debugln

func Debugln(v ...interface{})

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

func Error

func Error(v ...interface{})

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

func Errorf

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

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

func Errorln

func Errorln(v ...interface{})

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

func Fatal

func Fatal(v ...interface{})

Fatal loggs a message at level Fatal on the standard logger.

func Fatalf

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

Fatalf loggs a message at level Fatal on the standard logger.

func Fatalln

func Fatalln(v ...interface{})

Fatalln loggs a message at level Fatal on the standard logger.

func Info

func Info(v ...interface{})

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

func Infof

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

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

func Infoln

func Infoln(v ...interface{})

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

func Instance

func Instance() *logrus.Logger

Instance returns the underlying logger instance

func Panic

func Panic(v ...interface{})

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

func Panicf

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

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

func Panicln

func Panicln(v ...interface{})

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

func Print

func Print(v ...interface{})

Print loggs a message at level Print on the standard logger.

func Printf

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

Printf loggs a message at level Print on the standard logger.

func Println

func Println(v ...interface{})

Println loggs a message at level Print on the standard logger.

func SetFormat

func SetFormat(v string)

SetFormat sets the format of the standard logger

func SetLevel

func SetLevel(v string)

SetLevel sets the level of the standard logger

func SetOutput

func SetOutput(v string)

SetOutput sets the output of the standard logger

func Warn

func Warn(v ...interface{})

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

func Warnf

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

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

func Warnln

func Warnln(v ...interface{})

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

func WithField

func WithField(key string, value interface{}) *logrus.Entry

WithField prepares a log entry with a single data field.

func WithFields

func WithFields(fields map[string]interface{}) *logrus.Entry

WithFields prepares a log entry with multiple data fields.

func WithPrefix

func WithPrefix(value interface{}) *logrus.Entry

WithPrefix prepares a log entry with a prefix.

Types

type JSONFormatter

type JSONFormatter struct {
	IgnoreFields    []string
	TimestampFormat string
}

func (*JSONFormatter) Format

func (f *JSONFormatter) Format(entry *logrus.Entry) (data []byte, err error)

type Logger

type Logger struct {
	*logrus.Logger
}

Logger ...

func New

func New() *Logger

New returns a new Logger instance.

func (*Logger) SetFormat

func (l *Logger) SetFormat(v string)

SetFormat sets the logging format of the logger instance.

func (*Logger) SetLevel

func (l *Logger) SetLevel(v string)

SetLevel sets the logging level of the logger instance.

func (*Logger) SetOutput

func (l *Logger) SetOutput(v string)

SetOutput sets the logging output of the logger instance.

type TextFormatter

type TextFormatter struct {
	IgnoreFields    []string
	TimestampFormat string
}

func (*TextFormatter) Format

func (f *TextFormatter) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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