log

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(message ...interface{})

Debug logs a message at level Debug on the standard logger.

func Fatal

func Fatal(message ...interface{})

Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1.

func SetLogger

func SetLogger(givenLogger Logger)

SetLogger takes a structured logger to interface with. After the logger is setup it will be available across your packages If SetLogger is not used Debug will not create output

func Warn

func Warn(message ...interface{})

Warn logs a message at level Warn on the standard logger.

Types

type Logger

type Logger interface {
	Debug(...interface{})
	Warn(...interface{})
	Fatal(...interface{})
}

Logger is a interface for creating standard logging calls. This will enable depended code log.Debug("Woot") Avoid all other packages from declaring their own loggers This strategy enables simple change of the backend logger

Jump to

Keyboard shortcuts

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