logger

package
v0.0.0-...-ea873bd Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(args ...interface{})

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

func Error

func Error(args ...interface{})

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

func Fatal

func Fatal(args ...interface{})

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

func Info

func Info(args ...interface{})

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

func Panic

func Panic(args ...interface{})

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

func Print

func Print(args ...interface{})

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

func Warn

func Warn(args ...interface{})

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

func WithContext

func WithContext(ctx context.Context) *logrus.Entry

WithContext creates an entry from the standard logger and adds a context to it.

func WithError

func WithError(err error) *logrus.Entry

WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.

func WithField

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

WithField creates an entry from the standard logger and adds a field to it. If you want multiple fields, use `WithFields`.

Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.

func WithFields

func WithFields(fields logrus.Fields) *logrus.Entry

WithFields creates an entry from the standard logger and adds multiple fields to it. This is simply a helper for `WithField`, invoking it once for each field.

Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.

func WithTime

func WithTime(t time.Time) *logrus.Entry

WithTime creates an entry from the standard logger and overrides the time of logs generated with it.

Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal or Panic on the Entry it returns.

Types

This section is empty.

Jump to

Keyboard shortcuts

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