Documentation ¶
Index ¶
- func NewLogger(opts ...logger.Option) logger.Logger
- func ReportCaller() logger.Option
- func UseAsDefault() logger.Option
- func WithDevelopmentMode() logger.Option
- func WithExitFunc(exit func(int)) logger.Option
- func WithHooks(hooks []zerolog.Hook) logger.Option
- func WithProductionMode() logger.Option
- func WithTimeFormat(timeFormat string) logger.Option
- func ZerologToLoggerLevel(level zerolog.Level) logger.Level
- type Mode
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportCaller ¶
func UseAsDefault ¶
func WithDevelopmentMode ¶
func WithExitFunc ¶
func WithProductionMode ¶
func WithTimeFormat ¶
Types ¶
type Options ¶
type Options struct { logger.Options // Flag for whether to log caller info (off by default) ReportCaller bool // Use this logger as system wide default logger (off by default) UseAsDefault bool // zerolog hooks Hooks []zerolog.Hook // TimeFormat is one of time.RFC3339, time.RFC3339Nano, time.* TimeFormat string // Runtime mode. (Production by default) Mode Mode // Exit Function to call when FatalLevel log ExitFunc func(int) }
Click to show internal directories.
Click to hide internal directories.