mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-11-08 16:20:02 +00:00
Log all config loads
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
d1e63f0c2b
commit
ef0767e396
2 changed files with 7 additions and 6 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
6
main.go
6
main.go
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue