Documentation ¶
Overview ¶
Package logger provides a simplified logger to write log lines into a writer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log func(...interface{})
Log lets clients output log lines into the previously specified writer. Different argument types –listed below– will be used to define the log line composition. The order is important, as arguments can override. By default, info log lines are provided.
- `context.Context` Known execution indicators are extracted from the context and provided in the log line as tags.
- `string` The argument will be used as the log message.
- `error` The error message will be used as the log message. An error log line will be provided. Error tags will be extracted and used as tags.
- `kv.Pair` Each pair will be used as a log line tag.
Other types will be ignored.
Click to show internal directories.
Click to hide internal directories.