log

package
v0.0.0-...-6c2d9fc Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2017 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorState = false

ErrorState denotes if application is in an error state.

View Source
var IsDebugging = false

IsDebugging toggles whether or not to enable debug output and behavior.

View Source
var Stderr io.Writer = os.Stderr

Stderr is the logging destination for error messages.

View Source
var Stdin io.Reader = os.Stdin

Stdin is the input alternative for logging.

Applications that take console-like input should use this.

View Source
var Stdout io.Writer = os.Stdout

Stdout is the logging destination for normal messages.

Functions

func CleanExit

func CleanExit(format string, v ...interface{})

CleanExit prints a message and then exits with 0.

func Debug

func Debug(format string, v ...interface{})

Debug prints a cyan-tinted message if IsDebugging is true.

func Die

func Die(format string, v ...interface{})

Die prints an error and then call os.Exit(1).

func Err

func Err(format string, v ...interface{})

Err prints an error message. It does not cause an exit.

func Info

func Info(format string, v ...interface{})

Info prints a green-tinted message.

func Msg

func Msg(format string, v ...interface{})

Msg passes through the formatter, but otherwise prints exactly as-is.

No prettification.

func New

func New() *log.Logger

New creates a *log.Logger that writes to this source.

func Warn

func Warn(format string, v ...interface{})

Warn prints a yellow-tinted warning message.

Types

This section is empty.

Jump to

Keyboard shortcuts

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