From 686dd599160b221c1007bce28fc083923d11e5bf Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 26 Jul 2015 22:06:28 +0800 Subject: fix #864 with migration and update locale --- modules/log/log.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/log/log.go') diff --git a/modules/log/log.go b/modules/log/log.go index 82492ce3..c1db6c6c 100644 --- a/modules/log/log.go +++ b/modules/log/log.go @@ -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 } -- cgit v1.2.3