log

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: BSD-3-Clause Imports: 3 Imported by: 45

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(fs *flag.FlagSet)

AddFlags adds the flags used by this package to the given FlagSet. That's useful if working with a custom FlagSet. The init function of this package adds the flags to flag.CommandLine anyway. Thus, it's usually enough to call flag.Parse() to make the logging flags take effect.

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 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 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 Orig

func Orig() *logrus.Logger

Orig provides access to the underlying *logrus.Logger

Types

type Logger

type Logger interface {
	Debugln(...interface{})
	Debugf(string, ...interface{})

	Infoln(...interface{})
	Infof(string, ...interface{})

	Errorln(...interface{})
	Errorf(string, ...interface{})

	Output(calldepth int, s string) error

	With(key string, value interface{}) Logger
}

Logger is the interface for loggers used in transporter components

func Base

func Base() Logger

Base returns the default Logger logging to

func With

func With(key string, value interface{}) Logger

With adds a field to the logger.

Jump to

Keyboard shortcuts

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