Documentation ¶
Index ¶
Constants ¶
View Source
const (
// LevelOverwrite is the default endpoint for overwrite level handler.
LevelOverwrite = "/logging-level"
)
Variables ¶
This section is empty.
Functions ¶
func ConfigureSentry ¶
func ConfigureSentry(cfg *SentryConfig)
ConfigureSentry add sentry hook into logger.
func LevelOverwriteHandler ¶
LevelOverwriteHandler returns a handler for overwrite logging level for a duration. If this hanlder is invoked multiple times, the earliest finish time based on duration will reset the logging level.
Types ¶
type LogFieldFormatter ¶
LogFieldFormatter add fields provided in each log message. It provides a way to send log with default fields
type SecretsFormatter ¶
SecretsFormatter scrubs sensitive information from logs and formats logs into parsable json.
type SentryConfig ¶
type SentryConfig struct { Enabled bool `yaml:"enabled"` // DSN is the sentry DSN name. DSN string `yaml:"dsn"` // Tags are forwarded to the raven client, and enables sentry logs to be // filtered by the given tags. Tags map[string]string }
SentryConfig is sentry logging specific configuration.
Click to show internal directories.
Click to hide internal directories.