Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger interface {
Debug() *zerolog.Event // Debug returns a debug level zerolog event
Disable() // Disable disables this logger permanently
Error() *zerolog.Event // Error returns an error level zerolog event
IDGet() string // IDGet returns the request ID for this logger
IDSet(id string) // IDSet sets a request id in the logger
Info() *zerolog.Event // Info returns an info level zerolog event
ParentID() string // ParentID returns the ID of the parent of this logger, or an empty string if there is no parent
SetDebug(bool) // SetDebug enables or disables debug level logging for this logger
SetOutput(io.Writer) // SetOutput sets a new output writer for the logger
SubLogger() Logger // SubLogger returns a child logger to this logger
Warn() *zerolog.Event // Warn returns a warn level zerolog event
}
Logger interface definition
NOTE: Disabling a logger zeros all internally stored values. Further usage
after disabling will result in nil pointer de-referencing and crashes.
func NewTestLogger ¶ added in v0.10.1
func NewTestLogger() Logger
NewTestLogger returns a testing logger that NOOPs all calls
Click to show internal directories.
Click to hide internal directories.