fix #864 with migration and update locale

This commit is contained in:
Unknwon 2015-07-26 22:06:28 +08:00
parent 6f8e388b55
commit 686dd59916
19 changed files with 587 additions and 96 deletions

File diff suppressed because one or more lines are too long

View file

@ -214,7 +214,11 @@ func (l *Logger) writerMsg(skip, level int, msg string) error {
fnName = strings.TrimLeft(filepath.Ext(fn.Name()), ".") + "()"
}
lm.msg = fmt.Sprintf("[%s:%d %s] %s", filepath.Base(file), line, fnName, msg)
fileName := file
if len(fileName) > 20 {
fileName = "..." + fileName[len(fileName)-20:]
}
lm.msg = fmt.Sprintf("[%s:%d %s] %s", fileName, line, fnName, msg)
} else {
lm.msg = msg
}