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

os/command: When RunWithValue method executes RunWithValueError, logging asynchronously, using Fatal cannot record the error #4146

Open
ppanphper opened this issue Feb 7, 2025 · 0 comments
Labels
bug It is confirmed a bug, but don't worry, we'll handle it.

Comments

@ppanphper
Copy link
Contributor

Go version

go1.23.5

GoFrame version

2.8.3

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

当命令程序启动时报panic,RunWithValue执行RunWithValueError返回错误,使用fatal打印日志,并且是异步打日志的时候,因为是起goroutine执行,还没等执行完,Fatal就退出了。导致看不到任何信息。

Image

Image

Image

Image

Image

What did you see happen?

程序报panic,却看不到任何日志,进程退出。

What did you expect to see?

看到错误信息好排查原因。

@ppanphper ppanphper added the bug It is confirmed a bug, but don't worry, we'll handle it. label Feb 7, 2025
@Issues-translate-bot Issues-translate-bot changed the title os/command: RunWithValue 方法执行RunWithValueError返回错误时,异步打日志,使用Fatal无法记录错误 os/command: When RunWithValue method executes RunWithValueError, logging asynchronously, using Fatal cannot record the error Feb 7, 2025
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.
Projects
None yet
Development

No branches or pull requests

1 participant