1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-11 17:42:48 +00:00

wip - oauth

This commit is contained in:
2018-02-09 23:58:23 -06:00
parent 1fdeb3783a
commit 33c6e8e3fc
10 changed files with 195 additions and 27 deletions

14
main.go
View File

@@ -10,24 +10,18 @@ import (
)
func init() {
log.SetLevel(log.DebugLevel)
log.SetFormatter(&log.JSONFormatter{})
log.SetOutput(os.Stdout)
//read config file
config.Init()
// Log as JSON instead of the default ASCII formatter.
log.SetFormatter(&log.JSONFormatter{})
// Output to stdout instead of the default stderr
// Can be any io.Writer, see below for File example
log.SetOutput(os.Stdout)
if config.Flags.Prod {
// prod
gin.SetMode(gin.ReleaseMode)
// Only log the warning severity or above.
log.SetLevel(log.WarnLevel)
} else {
// debug
log.SetLevel(log.DebugLevel)
}
}