Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Level at which to log. Defaults to DEBUG. // Acceptable are ERROR, WARN, INFO, and DEBUG. Level string // HumanReadable toggles the JSON format off in favour of a colourised // log formatted for human readers. HumanReadable bool // Output defines to where logs are written. The default is os.Stdout. Output io.Writer }
Config records the requested settings for a logger for use with New().
type Logger ¶
type Logger interface { // Debug will emit the event with level DEBUG. Debug(event interface{}) // Info will emit the event with level INFO. Info(event interface{}) // Warn will emit the event with level WARN Warn(event interface{}) // Error will emit the event with level ERROR. Error(event interface{}) // SetField applies a contextual annotation to all // future events logged with this logger. SetField(name string, value interface{}) // Copy the logger of use in some other context. Copy() Logger }
Logger is a logging system abstraction that supports levelled, strictly structured log emissions.
Click to show internal directories.
Click to hide internal directories.