Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Level must be supported by the selected log adapter, most support this: // "debug", "info", "warn", "error" // some include more level: // "trace", "fatal" Level string `mapstructure:"level" default:"info"` // Output is the logging sink to use, currently supported: // "stdout", "stderr", "<filename>" Output string `mapstructure:"output" default:"stdout"` // Format is the logging encoding, currently supported: // "text", "json" Format string `mapstructure:"format" default:"text"` // FormatTime is the time encoding, all golang time formats are supported. // Defaults to [time.RFC3339] TimeFormat string `mapstructure:"timeFormat" default:""` }
Config defines a configuration for use with loggers
func DefaultConfig ¶
DefaultConfig returns the default logging configuration to be used until a config file has been parsed to configure the real logger. It reads environment variables LOG_* to adjust logging as early as possible before even config parsing takes place.
type ConfigWithLogging ¶
type ConfigWithLogging interface {
LoggingConfig() Config
}
ConfigWithLogging denotes types which implement LoggingConfig(). Used to decorate loggers if a config provides logging details.
Click to show internal directories.
Click to hide internal directories.