mirror of
https://github.com/Xevion/banner.git
synced 2025-12-08 22:06:32 -06:00
Continue improving comments & use of structured logs
This commit is contained in:
4
main.go
4
main.go
@@ -63,11 +63,11 @@ func init() {
|
||||
envVarSplit := strings.Split(envVar, "=")
|
||||
environmentDict.Str(envVarSplit[0], envVarSplit[1])
|
||||
})
|
||||
log.Info().Dict("env", environmentDict).Msg("env")
|
||||
|
||||
if isDevelopment {
|
||||
log.Logger = zerolog.New(logOut{}).With().Timestamp().Logger()
|
||||
}
|
||||
log.Info().Dict("env", environmentDict).Msg("env")
|
||||
|
||||
discordgo.Logger = func(msgL, caller int, format string, a ...interface{}) {
|
||||
pc, file, line, _ := runtime.Caller(caller)
|
||||
@@ -146,7 +146,7 @@ func main() {
|
||||
lo.ForEach(commandDefinitions, func(cmd *discordgo.ApplicationCommand, _ int) {
|
||||
arr.Str(cmd.Name)
|
||||
})
|
||||
log.Info().Array("commands", zerolog.Arr()).Msg("Registering commands")
|
||||
log.Info().Array("commands", arr).Msg("Registering commands")
|
||||
|
||||
// Register commands
|
||||
registeredCommands := make([]*discordgo.ApplicationCommand, len(commandDefinitions))
|
||||
|
||||
Reference in New Issue
Block a user