Documentation
¶
Overview ¶
Package logging is instigator's leveled, printf-style log output: one line per record - an RFC3339 timestamp, the level (DEBUG/INFO/WARN/ERROR), then the formatted message. A nil *Logger is a silent no-op, so an unset logger costs nothing and every call site can stay unconditional.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Level ¶
type Level int
Level is a log severity; the four constants are the only levels instigator uses, ordered least to most severe.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger writes leveled, printf-style lines to one destination. A nil *Logger is safe to call - every method is a no-op - matching the unset-means-silent convention callers and tests rely on.
func New ¶
New builds a Logger writing to w. min is the lowest level written; records below it cost only a level comparison, since the level methods check Enabled before formatting their arguments.