Documentation
¶
Overview ¶
package debugger provides an environment based logger
In order for logs to display, the DEBUG environment variable must be set and match the key provided to debugger.NewDebugger
DEBUG may be set as a comma-separated list, and also supports wildcards matching (*).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Debugger ¶
type Debugger interface {
// Log will output log message to stdout, prefixed with key
Log(vals ...interface{})
}
Debugger provides logging based on DEBUG environment variable
If the provided debugger key is found to be a match for the environment, logs will be displayed.
func NewDebugger ¶
NewDebugger provides creates a new Debugger based the provided key. Each debugger will be assigned a different color, up to five colors, then repeat.
key will be compared with the environment variable "DEBUG" in order to determine if logs should be output.

