mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-02-01 11:01:33 +00:00
Merge pull request #784 from sysadmind/log-startup
Adjust log level for collector startup
This commit is contained in:
commit
285462b3c8
@ -83,7 +83,7 @@ func main() {
|
|||||||
|
|
||||||
if err := c.ReloadConfig(*configFile, logger); err != nil {
|
if err := c.ReloadConfig(*configFile, logger); err != nil {
|
||||||
// This is not fatal, but it means that auth must be provided for every dsn.
|
// This is not fatal, but it means that auth must be provided for every dsn.
|
||||||
level.Error(logger).Log("msg", "Error loading config", "err", err)
|
level.Warn(logger).Log("msg", "Error loading config", "err", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
dsns, err := getDataSources()
|
dsns, err := getDataSources()
|
||||||
@ -127,7 +127,7 @@ func main() {
|
|||||||
[]string{},
|
[]string{},
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
level.Error(logger).Log("msg", "Failed to create PostgresCollector", "err", err.Error())
|
level.Warn(logger).Log("msg", "Failed to create PostgresCollector", "err", err.Error())
|
||||||
} else {
|
} else {
|
||||||
prometheus.MustRegister(pe)
|
prometheus.MustRegister(pe)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user