unify log and tracing descriptions

This commit is contained in:
Willy Kloucek
2022-06-14 11:48:46 +02:00
parent 61e89ea48f
commit 7bc96443f6
44 changed files with 111 additions and 107 deletions
+4 -4
View File
@@ -2,8 +2,8 @@ package config
// Log defines the available log configuration.
type Log struct {
Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;WEB_LOG_LEVEL"`
Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;WEB_LOG_PRETTY"`
Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;WEB_LOG_COLOR"`
File string `mapstructure:"file" env:"OCIS_LOG_FILE;WEB_LOG_FILE"`
Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;WEB_LOG_LEVEL" desc:"The log level. Valid values are: \"panic\", \"fatal\", \"error\", \"warn\", \"info\", \"debug\", \"trace\"."`
Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;WEB_LOG_PRETTY" desc:"Activates pretty log output."`
Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;WEB_LOG_COLOR" desc:"Activates colorized log output."`
File string `mapstructure:"file" env:"OCIS_LOG_FILE;WEB_LOG_FILE" desc:"The path to the log file. Activates logging to this file if set."`
}
+1 -1
View File
@@ -2,7 +2,7 @@ package config
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;WEB_TRACING_ENABLED"`
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;WEB_TRACING_ENABLED" desc:"Activates tracing."`
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;WEB_TRACING_TYPE" desc:"The type of tracing. Defaults to \"\", which is the same as \"jaeger\". Allowed tracing types are \"jaeger\" and \"\" as of now."`
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;WEB_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent."`
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;WEB_TRACING_COLLECTOR" desc:"The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. Only used if the tracing endpoint is unset."`