mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-12-20 10:21:22 +00:00
Log the index of the configuration which failed to initialize
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
d877ce02d4
commit
00e4b2f859
1 changed files with 5 additions and 2 deletions
7
main.go
7
main.go
|
@ -64,8 +64,11 @@ func main() {
|
||||||
discord.Identify.Intents = discordgo.IntentsAll
|
discord.Identify.Intents = discordgo.IntentsAll
|
||||||
|
|
||||||
var enabledModules int
|
var enabledModules int
|
||||||
for _, mc := range config.ModuleConfigs {
|
for i, mc := range config.ModuleConfigs {
|
||||||
logger := log.WithField("module", mc.Type)
|
logger := log.WithFields(log.Fields{
|
||||||
|
"idx": i,
|
||||||
|
"module": mc.Type,
|
||||||
|
})
|
||||||
mod := GetModuleByName(mc.Type)
|
mod := GetModuleByName(mc.Type)
|
||||||
if mod == nil {
|
if mod == nil {
|
||||||
logger.Fatal("Found configuration for unsupported module")
|
logger.Fatal("Found configuration for unsupported module")
|
||||||
|
|
Loading…
Reference in a new issue