Package logger

import "github.com/BurntSushi/wingo/logger"
Overview
Index

Overview ▾

package logger is a very light wrapper around 'log' so we can control IO. It can also print pretty colors.

Constants

const (
    FlagError   = 1 << iota // errors are very bad and unrecoverable
    FlagWarning             // warnings are bad things that don't stop us
    FlagMessage             // casual; typically describing state changes
    FlagLots                // more output than you could possibly need
    FlagDebug               // random debug output formatted differently
)

Variables

var (
    Debug, Lots, Message, Warning, Error *logger
)

func Colors

func Colors(enable bool)

func FlagsSet

func FlagsSet(newFlags int)

func LevelSet

func LevelSet(lvl int)

LevelSet is a shortcut for setting log output flags. Valid log levels are integers in the range 0 to 4, inclusive. The higher the level, the more output.