mirror of
https://github.com/goharbor/harbor.git
synced 2025-01-20 06:31:55 +01:00
Merge pull request #8359 from nlowe/bugfix/logging-line-call-outside-repo-root
Fix logger line() call if built outside of the repo root
This commit is contained in:
commit
97c812a1e8
@ -278,7 +278,7 @@ func line(callDepth int) string {
|
||||
line = 0
|
||||
}
|
||||
l := strings.SplitN(file, srcSeparator, 2)
|
||||
if len(l) > 0 {
|
||||
if len(l) > 1 {
|
||||
file = l[1]
|
||||
}
|
||||
return fmt.Sprintf("[%s:%d]:", file, line)
|
||||
|
Loading…
Reference in New Issue
Block a user