Documentation ¶
Index ¶
- func NewPacketLogr(opts ...LoggerOption) (logr.Logger, *zap.Logger, error)
- type LoggerOption
- func WithEnableErrLogsToStderr(enable bool) LoggerOption
- func WithEnableRollbar(enable bool) LoggerOption
- func WithKeysAndValues(kvs []interface{}) LoggerOption
- func WithLogLevel(level string) LoggerOption
- func WithOutputPaths(paths []string) LoggerOption
- func WithRollbarConfig(config rollbarConfig) LoggerOption
- func WithServiceName(name string) LoggerOption
- type PacketLogr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPacketLogr ¶
NewPacketLogr is the opionated packet logger setup
Types ¶
type LoggerOption ¶
type LoggerOption func(*PacketLogr)
LoggerOption for setting optional values
func WithEnableErrLogsToStderr ¶
func WithEnableErrLogsToStderr(enable bool) LoggerOption
WithEnableErrLogsToStderr sends .Error logs to stderr
func WithEnableRollbar ¶
func WithEnableRollbar(enable bool) LoggerOption
WithEnableRollbar sends error logs to Rollbar service
func WithKeysAndValues ¶
func WithKeysAndValues(kvs []interface{}) LoggerOption
WithKeysAndValues adds extra key/value fields
func WithOutputPaths ¶
func WithOutputPaths(paths []string) LoggerOption
WithOutputPaths adds output paths
func WithRollbarConfig ¶
func WithRollbarConfig(config rollbarConfig) LoggerOption
WithRollbarConfig customizes the Rollbar details
func WithServiceName ¶
func WithServiceName(name string) LoggerOption
WithServiceName adds a service name a logged field
type PacketLogr ¶
PacketLogr is a wrapper around zap.SugaredLogger
Click to show internal directories.
Click to hide internal directories.