mirror of
https://github.com/Luzifer/twitch-bot.git
synced 2024-12-30 00:21:16 +00:00
Log amount of loaded rules on reload
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
6a03840592
commit
d1e63f0c2b
2 changed files with 8 additions and 4 deletions
|
@ -24,8 +24,8 @@ type configFile struct {
|
|||
rawLogWriter io.WriteCloser
|
||||
}
|
||||
|
||||
func newConfigFile() configFile {
|
||||
return configFile{
|
||||
func newConfigFile() *configFile {
|
||||
return &configFile{
|
||||
PermitTimeout: time.Minute,
|
||||
}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ func loadConfig(filename string) error {
|
|||
}
|
||||
}
|
||||
|
||||
config = &tmpConfig
|
||||
config = tmpConfig
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
6
main.go
6
main.go
|
@ -127,7 +127,11 @@ func main() {
|
|||
|
||||
irc.ExecuteJoins(config.Channels)
|
||||
|
||||
log.Info("Config file reloaded")
|
||||
log.WithFields(log.Fields{
|
||||
"auto_messages": len(config.AutoMessages),
|
||||
"rules": len(config.Rules),
|
||||
"channels": len(config.Channels),
|
||||
}).Info("Config file reloaded")
|
||||
|
||||
case <-autoMessageTicker.C:
|
||||
configLock.RLock()
|
||||
|
|
Loading…
Reference in a new issue