log

package
v0.0.0-...-ab9bce8 Latest Latest
Warning

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

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

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.Ldate|log.Ltime|log.Lmicroseconds)}

	// 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)}
)

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