mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
expose log.level for promlog for remote_storage_adapter (#4195)
* expose log.level for promlog for remote_storage_adapter Signed-off-by: sipian <cs15btech11019@iith.ac.in> * replace flag description Signed-off-by: Harsh Agarwal <cs15btech11019@iith.ac.in>
This commit is contained in:
parent
c016b63219
commit
6a464ae174
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue