Documentation ¶
Index ¶
Constants ¶
const ComponentLogPrefix = "component"
ComponentLogPrefix is used by the logger to prefix log messages with the component name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a type that is used to hold metadata that should be used in the loggers methods.
func New ¶
New creates a new logger with the passed prefix and logger implementation. When loggerImpl is nil, the default logger of zerolog will be used.
func (*Logger) Debug ¶
Debug logs a message with level debug. This function appends the name of the Component from the receiver to the log message.
func (*Logger) Err ¶
Err logs a message with level error. This function appends the name of the Component from the receiver to the log message.
The supplied error will be applied to the log message.
func (*Logger) Info ¶
Info logs a message with level info. This function appends the name of the Component from the receiver to the log message.