Log

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VerbosityError shows only error messages
	VerbosityError = Verbosity(iota)
	// VerbosityWarning shows error and warning messages
	VerbosityWarning = Verbosity(iota)
	// VerbosityNote shows error, warning and note messages
	VerbosityNote = Verbosity(iota)
	// VerbosityDebug shows all messages
	VerbosityDebug = Verbosity(iota)
)

Variables

View Source
var (
	// Error is a predefined log channel for errors. This log is backed by consumer.Log
	Error = log.New(logEnabled, "ERROR: ", log.Lshortfile)

	// Warning is a predefined log channel for warnings. This log is backed by consumer.Log
	Warning = log.New(logDisabled, "", 0)

	// Note is a predefined log channel for notes. This log is backed by consumer.Log
	Note = log.New(logDisabled, "", 0)

	// Debug is a predefined log channel for debug messages. This log is backed by consumer.Log
	Debug = log.New(logDisabled, "", 0)
)

Functions

func SetVerbosity

func SetVerbosity(loglevel Verbosity)

SetVerbosity defines the type of messages to be processed. High level verobosities contain lower levels, i.e. log level warning will contain error messages, too.

func SetWriter

func SetWriter(writer io.Writer)

SetWriter forces (enabled) logs to be written to the given writer.

Types

type Verbosity

type Verbosity byte

Verbosity defines an enumeration for log verbosity

Jump to

Keyboard shortcuts

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