Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CurrentLogOptions = LogOptions{ LogLevel: zerolog.DebugLevel, LogHTTP: false, }
CurrentLogOptions stores global LogOptions.
Functions ¶
func Configure ¶
func Configure(opts *LogOptions)
Configure configures logger using app config (console + file, level).
func SetLogLevel ¶
SetLogLevel sets global log level to the given one.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector collects node logs.
func NewCollector ¶
func NewCollector(options *LogOptions) *Collector
NewCollector creates a Collector instance.
type LogCapturer ¶
type LogCapturer struct {
// contains filtered or unexported fields
}
LogCapturer captures logging messages to an in-memory slice for accessing later. Typical use case is asserting certain log messages in tests.
func (*LogCapturer) Attach ¶
func (l *LogCapturer) Attach()
Attach attaches LogCapturer hook to the global zerolog instance.
func (*LogCapturer) Detach ¶
func (l *LogCapturer) Detach()
Detach restores original global zerolog instance.
func (*LogCapturer) Messages ¶
func (l *LogCapturer) Messages() []string
Messages returns all captures log messages.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.