feat: improve logging on startup

Update the exporter logging on startup to include the exporter version,
the path to the fail2ban socket, and whether basic-auth is enabled or not.
Fix code printing error messages on invalid CLI parameters to correct line
breaks and correctly print the "usage" information.
This commit is contained in:
Hector
2022-02-19 11:21:58 +00:00
parent ec10999814
commit e2902b8cc2
4 changed files with 12 additions and 9 deletions

View File

@ -16,6 +16,7 @@ type Collector struct {
}
func NewExporter(appSettings *cfg.AppSettings, exporterVersion string) *Collector {
log.Printf("reading metrics from fail2ban socket: %s", appSettings.Fail2BanSocketPath)
return &Collector{
socketPath: appSettings.Fail2BanSocketPath,
exporterVersion: exporterVersion,