Documentation ¶
Index ¶
- Variables
- func Disable() io.Writer
- func SetLogLevel(level string) error
- func SetLogOutput(out io.Writer) io.Writer
- type Logger
- type WatermillLogger
- func (l *WatermillLogger) Debug(msg string, fields watermill.LogFields)
- func (l *WatermillLogger) Error(msg string, err error, fields watermill.LogFields)
- func (l *WatermillLogger) Info(msg string, fields watermill.LogFields)
- func (l *WatermillLogger) Trace(msg string, fields watermill.LogFields)
- func (l *WatermillLogger) With(fields watermill.LogFields) watermill.LoggerAdapter
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultLogOutput io.Writer = os.Stderr LogLevel log.Level = log.DebugLevel )
Package variables for output control.
Functions ¶
func SetLogLevel ¶
SetLogLevel changes the logging level to correspond with the provided argument. Accepted argument values are "panic", "fatal", "error", "warn", "info", "debug", "trace".
Types ¶
type WatermillLogger ¶
type WatermillLogger struct {
*Logger
}
WatermillLogger is the logger used for watermill.
func NewWLogger ¶
func NewWLogger(component string) *WatermillLogger
NewWLogger initializes a new WatermillLogger.
func (*WatermillLogger) Debug ¶
func (l *WatermillLogger) Debug(msg string, fields watermill.LogFields)
Debug creates a new debug log entry.
func (*WatermillLogger) Error ¶
func (l *WatermillLogger) Error(msg string, err error, fields watermill.LogFields)
func (*WatermillLogger) Info ¶
func (l *WatermillLogger) Info(msg string, fields watermill.LogFields)
Info creates a new info log entry.
func (*WatermillLogger) Trace ¶
func (l *WatermillLogger) Trace(msg string, fields watermill.LogFields)
Trace creates a new trace log entry.
func (*WatermillLogger) With ¶
func (l *WatermillLogger) With(fields watermill.LogFields) watermill.LoggerAdapter
With adds a map of fields to the log entry.
Click to show internal directories.
Click to hide internal directories.