Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRootLogger ¶
func NewRootLogger(options LoggerOutputOptions) (zerolog.Logger, func())
NewRootLogger creates a new zerolog logger with default settings.
func RegisterContextProvider ¶
func RegisterContextProvider(p ContextProvider)
RegisterContextProvider records a given context provider. This method is supposed to be called in an `init` method.
Types ¶
type ContextProvider ¶
type LoggerOutputOptions ¶
type Service ¶
type Service interface { // MustGetLogger creates a logger with given name. MustGetLogger(name string) zerolog.Logger // MustSetLevel sets the log level for the component with given name to given level. MustSetLevel(name, level string) // RotateLogFiles re-opens log file writer. RotateLogFiles() }
Service exposes the interfaces for a logger service that supports different loggers with different levels.
func NewService ¶
func NewService(defaultLevel string, options LoggerOutputOptions) (Service, error)
NewService creates a new Service.
Click to show internal directories.
Click to hide internal directories.