Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

错误堆栈打印不出来 #2047

Closed
gaoqinghuang opened this issue Aug 3, 2022 · 0 comments
Closed

错误堆栈打印不出来 #2047

gaoqinghuang opened this issue Aug 3, 2022 · 0 comments
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. done This issue is done, which may be release in next version.

Comments

@gaoqinghuang
Copy link

gaoqinghuang commented Aug 3, 2022

运行下面代码,发现堆栈打印不出来

package main

import (
	"context"
	"github.com/gogf/gf/v2/os/glog"
)

func Test(ctx context.Context) {
	glog.Error(ctx, "This is error!")
}

func main() {
	ctx := context.TODO()
	Test(ctx)
}

经排查:发现是这行把堆栈给忽略了

/github.com/gogf/gf/[email protected]/debug/gdebug/gdebug_caller.go:123

具体的情况是,GOROOT的路径是D://go 然后我程序目录是D://goVm 这里错误得把我的的程序目录当成GOROOT目录了(因为前缀相同)

暂时解决方法:换程序目录

gqcn added a commit that referenced this issue Aug 15, 2022
@gqcn gqcn added done This issue is done, which may be release in next version. bug It is confirmed a bug, but don't worry, we'll handle it. labels Aug 15, 2022
@gqcn gqcn closed this as completed Aug 15, 2022
gqcn added a commit that referenced this issue Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. done This issue is done, which may be release in next version.
Projects
None yet
Development

No branches or pull requests

2 participants