log

package
v0.0.0-...-cac7119 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Debug logs a _debug level message. It uses fmt.Fprint() to format args.
	Debug = nop
	// Info logs a _info level message. It uses fmt.Fprint() to format args.
	Info = nop
	// Warn logs a _warning level message. It uses fmt.Fprint() to format args.
	Warn = nop
	// Error logs an _error level message. It uses fmt.Fprint() to format args.
	Error = nop
	// Crit logs a _critical level message. It uses fmt.Fprint() to format args.
	Crit = nop

	// Debugf logs a _debug level message. It uses fmt.Fprintf() to format msg and args.
	Debugf = nopf
	// Infof logs a _info level message. It uses fmt.Fprintf() to format msg and args.
	Infof = nopf
	// Warnf logs a _warning level message. It uses fmt.Fprintf() to format msg and args.
	Warnf = nopf
	// Errorf logs a _error level message. It uses fmt.Fprintf() to format msg and args.
	Errorf = nopf
	// Critf logs a _critical level message. It uses fmt.Fprintf() to format msg and args.
	Critf = nopf
)

Functions

func IsEnabledFor

func IsEnabledFor(level golog.Level) bool

IsEnabledFor returns whether the default logger is enabled for the level.

func SetDefaultLogger

func SetDefaultLogger(l *golog.Logger)

SetDefaultLogger set the logger as the defaultLogger. The logging functions in this package use it as their logger. This function should be called before using below functions.

func SetLogFunc

func SetLogFunc(f func(args ...interface{}), level golog.Level)

SetLogFunc set the log function with specified level for the defaultLogger. This function should be called before SetDefaultLogger.

func SetLogfFunc

func SetLogfFunc(f func(msg string, args ...interface{}), level golog.Level)

SetLogfFunc set the logf function with specified level for the defaultLogger. This function should be called before SetDefaultLogger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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