Move experimental warnings from init()

init() causes warnings to be emitted despite collectors not being enabled.

Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
Ben Reedy
2021-02-20 08:59:49 +10:00
parent ee146b3710
commit ce0513f69d
2 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,6 @@ import (
)
func init() {
log.Info("smtp collector is in an experimental state! Metrics for this collector have not been tested.")
registerCollector("smtp", NewSMTPCollector, "SMTP Server")
}
@@ -69,6 +68,7 @@ type SMTPCollector struct {
}
func NewSMTPCollector() (Collector, error) {
log.Info("smtp collector is in an experimental state! Metrics for this collector have not been tested.")
const subsystem = "smtp"
return &SMTPCollector{