diff --git a/documentation/examples/remote_storage/remote_storage_adapter/main.go b/documentation/examples/remote_storage/remote_storage_adapter/main.go index e6e19889f..d2c83d5b9 100644 --- a/documentation/examples/remote_storage/remote_storage_adapter/main.go +++ b/documentation/examples/remote_storage/remote_storage_adapter/main.go @@ -54,6 +54,7 @@ type config struct { remoteTimeout time.Duration listenAddr string telemetryPath string + logLevel string } var ( @@ -99,8 +100,7 @@ func main() { http.Handle(cfg.telemetryPath, prometheus.Handler()) logLevel := promlog.AllowedLevel{} - logLevel.Set("debug") - + logLevel.Set(cfg.logLevel) logger := promlog.New(logLevel) writers, readers := buildClients(logger, cfg) @@ -141,6 +141,7 @@ func parseFlags() *config { ) flag.StringVar(&cfg.listenAddr, "web.listen-address", ":9201", "Address to listen on for web endpoints.") flag.StringVar(&cfg.telemetryPath, "web.telemetry-path", "/metrics", "Address to listen on for web endpoints.") + flag.StringVar(&cfg.logLevel, "log.level", "debug", "Only log messages with the given severity or above. One of: [debug, info, warn, error]") flag.Parse()