mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 00:57:44 +01:00
tiny update to logger
This commit is contained in:
parent
23ff97e2b0
commit
0c00869faa
@ -263,12 +263,12 @@ func line(calldepth int) string {
|
||||
line = 0
|
||||
}
|
||||
|
||||
for i := len(file) - 1; i > 0; i-- {
|
||||
if file[i] == '/' {
|
||||
for i := len(file) - 2; i > 0; i-- {
|
||||
if file[i] == os.PathSeparator {
|
||||
file = file[i+1:]
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%s:%d", file, line)
|
||||
return fmt.Sprintf("[%s:%d]:", file, line)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user