Change level of debug command, add command name to logging

main
William Perron 2 months ago
parent 87f40821dd
commit a40bbd0486
Signed by: wperron
GPG Key ID: BFDB4EF72D73C5F2

@ -1028,7 +1028,7 @@ func logCommandInvocation(ctx context.Context, name string, s *discordgo.Session
}
}
log.Info().Ctx(ctx).Msg("command invoked")
log.Info().Ctx(ctx).Str("command", name).Msg("command invoked")
}
func debugCommandCompletion(ctx context.Context, name string, dur time.Duration, err error, s *discordgo.Session, i *discordgo.InteractionCreate) {
@ -1036,7 +1036,7 @@ func debugCommandCompletion(ctx context.Context, name string, dur time.Duration,
if err != nil {
span.SetStatus(codes.Error, err.Error())
}
log.Info().Ctx(ctx).Dur("latency_ms", dur).Msg("command completed")
log.Debug().Ctx(ctx).Str("command", name).Dur("latency_ms", dur).Msg("command completed")
}
func min(a, b int) int {

Loading…
Cancel
Save