Documentation ¶
Overview ¶
Package svclog provides logging facilities for standard services.
Index ¶
- func LoggerOrNull(l logrus.FieldLogger) logrus.FieldLogger
- func NewLogger(cfg Config) logrus.FieldLogger
- func NewNullLogger() logrus.FieldLogger
- func NewSampleLogger(parentLogger logrus.FieldLogger, logsBurstLimit int, ...) logrus.FieldLogger
- func SaramaLogger(logger logrus.FieldLogger) logrus.FieldLogger
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerOrNull ¶ added in v0.0.26
func LoggerOrNull(l logrus.FieldLogger) logrus.FieldLogger
LoggerOrNull ensures non-nil logger is passed in or creates a Null Logger
func NewLogger ¶
func NewLogger(cfg Config) logrus.FieldLogger
NewLogger returns a new logger that includes app and deploy key/value pairs in each log line.
func NewNullLogger ¶ added in v0.0.26
func NewNullLogger() logrus.FieldLogger
NewNullLogger returns a logger that discards the output useful for testing
func NewSampleLogger ¶ added in v0.0.19
func NewSampleLogger(parentLogger logrus.FieldLogger, logsBurstLimit int, logBurstWindow time.Duration) logrus.FieldLogger
NewSampleLogger creates a rate limited logger that samples logs. The parameter logsBurstLimit defines how many logs are allowed per logBurstWindow duration. The returned logger derives from the parentLogger, but without inheriting any Hooks. All log entries derived from SampleLogger will contain 'sampled=true' field.
func SaramaLogger ¶
func SaramaLogger(logger logrus.FieldLogger) logrus.FieldLogger
SaramaLogger takes FieldLogger and returns a saramaLogger.