log

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Debug generates debug lines of output with a "DEBUG" prefix.
	// By default the lines are written to /dev/null.
	Debug = &Logger{log.New(ioutil.Discard, "DEBUG ", log.LstdFlags|log.Lshortfile)}

	// Info generates debug lines of output with a "INFO" prefix.
	// By default the lines are written to stdout.
	Info = &Logger{log.New(os.Stdout, "INFO ", log.LstdFlags|log.Lshortfile)}
)

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*log.Logger
}

Logger is a wrapper for log.Logger and provides methods to enable and disable logging.

func (*Logger) Disable

func (l *Logger) Disable()

Disable sets the logging output to /dev/null.

func (*Logger) Enable

func (l *Logger) Enable()

Enable sets the logging output to stdout.

Jump to

Keyboard shortcuts

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