1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 19:30:55 +00:00

add to upper case

This commit is contained in:
JessonChan 2016-03-24 17:49:39 +08:00
parent 0fb4a8af24
commit 8344a60552

View File

@ -475,7 +475,7 @@ var beeLoggerMap = struct {
func GetLogger(prefixes ...string) *log.Logger { func GetLogger(prefixes ...string) *log.Logger {
prefix := append(prefixes, "")[0] prefix := append(prefixes, "")[0]
if prefix != "" { if prefix != "" {
prefix = fmt.Sprintf(`[%s] `, prefix) prefix = fmt.Sprintf(`[%s] `, strings.ToUpper(prefix))
} }
beeLoggerMap.RLock() beeLoggerMap.RLock()
l, ok := beeLoggerMap.logs[prefix] l, ok := beeLoggerMap.logs[prefix]