1
0
mirror of https://github.com/beego/bee.git synced 2024-11-25 20:10:55 +00:00

format the log time

This commit is contained in:
astaxie 2014-08-23 14:15:38 +08:00
parent d749332330
commit 7ffe1060cc

View File

@ -132,8 +132,7 @@ func ColorLogS(format string, a ...interface{}) string {
log = clog + log log = clog + log
} }
return strings.TrimPrefix( return time.Now().Format("2006/01/02 15:04:05 ") + log
time.Now().Format("2006-01-02 03:04:05 "), "20") + log
} }
// getColorLevel returns colored level string by given level. // getColorLevel returns colored level string by given level.