Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
Logger is an extended version of the golang Logger to support structured errors.
func New ¶
New creates a new Logger with no Log flags set.
func NewLogSet ¶
NewLogSet returns a set of Loggers for commonly used output streams: errors, diagnostics, stdout. The error and stdout streams should generally never be suppressed. diagnostic can be suppressed by setting the output to ioutil.Discard. If an output destination is not needed, one can simply discard it by assigning it to '_'.
func (*Logger) Error ¶
Error is a convenience function for printing errors without a message.
func (*Logger) FatalE ¶
FatalE prints a string and error then calls os.Exit(1).
func (*Logger) PanicE ¶
PanicE prints a string and error then calls panic.
func (*Logger) PrintE ¶
PrintE prints the msg and its error message(s).
func (*Logger) SetDebug ¶
SetDebug sets the debug flag to the value of b
func (*Logger) SetFlags ¶
SetFlags is a wrapper around log.SetFlags that adds and removes, ": " to and from a prefix. This is needed because ": " is only added by golang's log package if either of the Lshortfile or Llongfile flags are set.