Skip to content

Commit fe5eb0c

Browse files
committed
log: incr caller tracing
1 parent 7ec9d11 commit fe5eb0c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

intra/log/logger.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,16 +612,21 @@ func (l *simpleLogger) writelog(lvl LogLevel, at int, msg string, args ...any) {
612612
}
613613
if ll || cc {
614614
switch lvl {
615+
case USR, STACKTRACE, NONE: // no-op
615616
case VVERBOSE:
616-
if _, x := caller1(at+nextframe+6, ">"); tracecaller(x) {
617+
if _, x := caller1(at+nextframe+7, ">"); tracecaller(x) {
617618
trace += x
618619
}
619620
fallthrough
620621
case VERBOSE:
621-
if _, x := caller1(at+nextframe+5, ">"); tracecaller(x) {
622+
if _, x := caller1(at+nextframe+6, ">"); tracecaller(x) {
622623
trace += x
623624
}
624625
fallthrough
626+
case DEBUG:
627+
if _, x := caller1(at+nextframe+5, ">"); tracecaller(x) {
628+
trace += x
629+
}
625630
case ERROR:
626631
if _, x := caller1(at+nextframe+4, ">"); tracecaller(x) {
627632
trace += x
@@ -637,7 +642,7 @@ func (l *simpleLogger) writelog(lvl LogLevel, at int, msg string, args ...any) {
637642
trace += x
638643
}
639644
fallthrough
640-
case DEBUG:
645+
default:
641646
if _, x := caller1(at+nextframe+1, ">"); tracecaller(x) {
642647
trace += x
643648
}

0 commit comments

Comments
 (0)