log textfile directory on startup
This commit is contained in:
parent
ac3681edb1
commit
172746eb71
@ -3,6 +3,7 @@ package textfile
|
||||
import (
|
||||
"fail2ban-prometheus-exporter/cfg"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"log"
|
||||
)
|
||||
|
||||
type Collector struct {
|
||||
@ -18,11 +19,15 @@ type fileData struct {
|
||||
}
|
||||
|
||||
func NewCollector(appSettings *cfg.AppSettings) *Collector {
|
||||
return &Collector{
|
||||
collector := &Collector{
|
||||
enabled: appSettings.FileCollectorEnabled,
|
||||
folderPath: appSettings.FileCollectorPath,
|
||||
fileMap: make(map[string]*fileData),
|
||||
}
|
||||
if collector.enabled {
|
||||
log.Printf("collector.textfile directory: %s", collector.folderPath)
|
||||
}
|
||||
return collector
|
||||
}
|
||||
|
||||
func (c *Collector) Describe(ch chan<- *prometheus.Desc) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user