Log all config loads

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-05-11 00:45:27 +02:00
parent d1e63f0c2b
commit ef0767e396
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D
2 changed files with 7 additions and 6 deletions

View file

@ -85,6 +85,13 @@ func loadConfig(filename string) error {
} }
config = tmpConfig config = tmpConfig
log.WithFields(log.Fields{
"auto_messages": len(config.AutoMessages),
"rules": len(config.Rules),
"channels": len(config.Channels),
}).Info("Config file (re)loaded")
return nil return nil
} }

View file

@ -127,12 +127,6 @@ func main() {
irc.ExecuteJoins(config.Channels) irc.ExecuteJoins(config.Channels)
log.WithFields(log.Fields{
"auto_messages": len(config.AutoMessages),
"rules": len(config.Rules),
"channels": len(config.Channels),
}).Info("Config file reloaded")
case <-autoMessageTicker.C: case <-autoMessageTicker.C:
configLock.RLock() configLock.RLock()
for _, am := range config.AutoMessages { for _, am := range config.AutoMessages {