|
package logger
|
Documentation in literate-programming-style is available at:
https://redhatinsights.github.io/insights-operator-utils/packages/logger/configuration.html
|
|
LoggingConfiguration represents configuration for logging in general
|
type LoggingConfiguration struct {
|
Debug enables pretty colored logging
|
Debug bool `mapstructure:"debug" toml:"debug"`
UseStderr bool `mapstructure:"use_stderr" toml:"use_stderr"`
|
LogLevel sets logging level to show. Possible values are:
"debug"
"info"
"warn", "warning"
"error"
"fatal"
logging level won't be changed if value is not one of listed above
|
LogLevel string `mapstructure:"log_level" toml:"log_level"`
|
LoggingToCloudWatchEnabled enables logging to CloudWatch
(configuration for CloudWatch is in CloudWatchConfiguration)
|
LoggingToCloudWatchEnabled bool `mapstructure:"logging_to_cloud_watch_enabled" toml:"logging_to_cloud_watch_enabled"`
|
LoggingToSentryEnabled enables logging to Sentry
(configuration for Sentry is in SentryLoggingConfiguration)
|
LoggingToSentryEnabled bool `mapstructure:"logging_to_sentry_enabled" toml:"logging_to_sentry_enabled"`
}
|
CloudWatchConfiguration represents configuration of CloudWatch logger
|
type CloudWatchConfiguration struct {
AWSAccessID string `mapstructure:"aws_access_id" toml:"aws_access_id"`
AWSSecretKey string `mapstructure:"aws_secret_key" toml:"aws_secret_key"`
AWSSessionToken string `mapstructure:"aws_session_token" toml:"aws_session_token"`
AWSRegion string `mapstructure:"aws_region" toml:"aws_region"`
LogGroup string `mapstructure:"log_group" toml:"log_group"`
StreamName string `mapstructure:"stream_name" toml:"stream_name"`
|
enable debug logs for debugging aws client itself
|
Debug bool `mapstructure:"debug" toml:"debug"`
}
|
SentryLoggingConfiguration represents the configuration of Sentry logger
|
type SentryLoggingConfiguration struct {
SentryDSN string `mapstructure:"dsn" toml:"dsn"`
SentryEnvironment string `mapstructure:"environment" toml:"environment"`
}
|