shorten file name in log

This commit is contained in:
Wenkai Yin 2016-04-01 17:10:21 +08:00
parent c22a642b55
commit 3d3c95177e

View File

@ -263,5 +263,12 @@ func line(calldepth int) string {
line = 0
}
for i := len(file) - 1; i > 0; i-- {
if file[i] == '/' {
file = file[i+1:]
break
}
}
return fmt.Sprintf("%s:%d", file, line)
}