Skip to content

Commit

Permalink
Fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardorg79 committed Jul 2, 2018
1 parent 3084a65 commit 2e41c73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func getDefaultLevel(def Level) Level {
if !ok {
return def
}
l := strToLevel(str)
l := StrToLevel(str)
if l == OTHER {
return def
}
Expand Down Expand Up @@ -223,7 +223,7 @@ func LoadLogProperties() {
// Levels
//
logLevels := make(map[string]Level)
logLevels[""] = strToLevel(props.GetString("log.level", ""))
logLevels[""] = StrToLevel(props.GetString("log.level", ""))
for k, v := range props.Map() {
if !strings.HasPrefix(k, "log.level.") {
continue
Expand All @@ -234,7 +234,7 @@ func LoadLogProperties() {
continue
}
loggerName := parts[2] //log.level.name1=stdout|file
logLevels[loggerName] = strToLevel(v)
logLevels[loggerName] = StrToLevel(v)
}

//
Expand All @@ -257,7 +257,7 @@ func LoadLogProperties() {

var writer Writer
loggerType := props.GetString(fmt.Sprintf("log.writer.%s.type", loggerName), "stdout")
loggerLevel := strToLevel(props.GetString(fmt.Sprintf("log.writer.%s.level", loggerName), "DEBUG"))
loggerLevel := StrToLevel(props.GetString(fmt.Sprintf("log.writer.%s.level", loggerName), "DEBUG"))
if loggerType == "stdout" {
writer = &WriterStdout{level: loggerLevel}
} else if loggerType == "file" {
Expand Down

0 comments on commit 2e41c73

Please sign in to comment.