Skip to content

Commit 433b8ea

Browse files
committed
intra: set gotraceback env
1 parent cf8b322 commit 433b8ea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

intra/tun2socks.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ func LogLevel(gologLevel, consolelogLevel int32) {
115115
dbg := dlvl <= log.DEBUG || clvl <= log.DEBUG
116116
settings.Debug = dbg
117117
if settings.Debug {
118-
debug.SetTraceback(usr.s())
118+
os.Setenv("GOTRACEBACK", sys.s())
119+
debug.SetTraceback(sys.s())
119120
} else {
120-
debug.SetTraceback(one.s())
121+
os.Setenv("GOTRACEBACK", usr.s())
122+
debug.SetTraceback(usr.s())
121123
}
122124

123125
log.I("tun: new levels; golog: %d, consolelog: %d; debug? %t",

0 commit comments

Comments
 (0)