Skip to content

Commit

Permalink
fixing the mess i made trying that last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblakeley committed Oct 12, 2017
1 parent 1effbba commit 8086c08
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,34 +779,23 @@ func initialiseSystem(arguments map[string]interface{}) error {
afterConfSetup(&config.Global)
}

<<<<<<< HEAD
if os.Getenv("TYK_LOGLEVEL") == "" && arguments["--debug"] == false {
switch strings.ToLower(config.Global.LogLevel) {
case "", "info":
//defualt, do nothing
=======
if os.Getenv("TYK_LOGLEVEL") == "" && arguments["--debug"] == false && config.Global.LogLevel != "" {
switch strings.ToLower(config.Global.LogLevel) {
>>>>>>> 9eec51288b412d3ee36a967c867901e33fb9bc01
case "error":
log.Level = logrus.ErrorLevel
case "warn":
log.Level = logrus.WarnLevel
case "debug":
log.Level = logrus.DebugLevel
<<<<<<< HEAD

default:
log.WithFields(logrus.Fields{
"prefix": "main",
}).Fatal("Invalid log level in config, must be error, warn or debug.")
}

=======
}
log.WithFields(logrus.Fields{
"prefix": "main",
}).Debugf("Using log level defined in config. Enabling %s-level output", strings.ToLower(config.Global.LogLevel))
>>>>>>> 9eec51288b412d3ee36a967c867901e33fb9bc01
}

if config.Global.Storage.Type != "redis" {
Expand Down

0 comments on commit 8086c08

Please sign in to comment.