mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-01 20:41:22 +01:00
shorten file name in log
This commit is contained in:
parent
c22a642b55
commit
3d3c95177e
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user