logger

package
v0.0.0-...-5f9e87e Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: BSD-3-Clause Imports: 4 Imported by: 14

Documentation

Overview

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

Index

Constants

View Source
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

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

Functions

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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