Skip to content

Commit

Permalink
file and line number correction using runtime.Caller(2)
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <[email protected]>
  • Loading branch information
vishr committed Dec 2, 2016
1 parent 9a43ff0 commit 447fe74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ func (l *Logger) log(v Lvl, format string, args ...interface{}) {
buf := l.bufferPool.Get().(*bytes.Buffer)
buf.Reset()
defer l.bufferPool.Put(buf)
_, file, line, _ := runtime.Caller(3)
_, file, line, _ := runtime.Caller(2)

if v >= l.level || v == 0 {
message := ""
Expand Down

0 comments on commit 447fe74

Please sign in to comment.