Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var LevelCodes = []string{
"TRC", "DBG", "INF", "WRN", "ERR", "FTL",
}
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface { // The following are printers that print at or below the given level from the constants above Fatal(txt interface{}) Error(txt interface{}) Warn(txt interface{}) Info(txt interface{}) Debug(txt interface{}) Trace(txt interface{}) // Check prints at error level but also returns a boolean if the error was not nil Check(err error) bool // SetPrinter enables loading a printer function to enable networked, piped, etc outputs SetPrinter(fn Printer) // SetLevel sets the error level, anything lower will not call the printer function SetLevel(level int) }
Logger is an interface that defines the set of operations relevant to a logger. This interface should be a stdlib interface really because logging is so useful for debugging.
Directories
¶
Path | Synopsis |
---|---|
Package log is an implementation of the logi.Logger interface that prints log entries to stdout with level code, compact since startup time.Duration and appends the code location of the call to the logger at the end of the log text.
|
Package log is an implementation of the logi.Logger interface that prints log entries to stdout with level code, compact since startup time.Duration and appends the code location of the call to the logger at the end of the log text. |
Click to show internal directories.
Click to hide internal directories.