Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TRACE *log.Logger DEBUG *log.Logger INFO *log.Logger WARN *log.Logger ERROR *log.Logger CRITICAL *log.Logger FATAL *log.Logger LOG *log.Logger FEEDBACK Feedback LogHandle io.Writer = ioutil.Discard OutHandle io.Writer = os.Stdout BothHandle io.Writer = io.MultiWriter(LogHandle, OutHandle) NotePads []*NotePad = []*NotePad{trace, debug, info, warn, err, critical, fatal} )
Functions ¶
func SetLogFile ¶
func SetLogFile(path string)
Conveniently Sets the Log Handle to a io.writer created for the file behind the given filepath Will only append to this file
func SetLogThreshold ¶
func SetLogThreshold(level Level)
Establishes a threshold where anything matching or above will be logged
func SetStdoutThreshold ¶
func SetStdoutThreshold(level Level)
Establishes a threshold where anything matching or above will be output
func UseTempLogFile ¶
func UseTempLogFile(prefix string)
Conveniently Creates a temporary file and sets the Log Handle to a io.writer created for it
Types ¶
type Feedback ¶
type Feedback struct{}
Feedback is special. It writes plainly to the output while logging with the standard extra information (date, file, etc) Only Println and Printf are currently provided for this
type Level ¶
type Level int
Level describes the chosen log level between debug and critical.
const ( LevelTrace Level = iota LevelDebug LevelInfo LevelWarn LevelError LevelCritical LevelFatal DefaultLogThreshold = LevelWarn DefaultStdoutThreshold = LevelError )
func StdoutThreshold ¶
func StdoutThreshold() Level
Level returns the current global output threshold.
Click to show internal directories.
Click to hide internal directories.