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

Improve error logging #394

Closed
wants to merge 1 commit into from
Closed

Improve error logging #394

wants to merge 1 commit into from

Conversation

tisonkun
Copy link

I don't know why. But the previous code log FATAL only while with this change it can log the stacktrace.

cc @stevenjoezhang

I don't know why. But the previous code log `FATAL` only while with this change it can log the stacktrace.
@SukkaW
Copy link
Member

SukkaW commented Aug 18, 2022

https://github.com/hexojs/hexo-log/blob/2d03ea33565f211beaa50df027c9a13d32f99e55/lib/log.js#L55-L61

Here is the real reason why the error stack is omitted from the console output.

@tisonkun
Copy link
Author

@SukkaW thanks! So is this patch resolve the issue correctly? Or it's by deisgn.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 51.351% when pulling ca4c9e1 on tisonkun:patch-1 into 43ca18e on hexojs:master.

@SukkaW
Copy link
Member

SukkaW commented Aug 18, 2022

@SukkaW thanks! So is this patch resolve the issue correctly? Or it's by deisgn.

The change explicitly disable the error stack logging.

cc @stevenjoezhang Is it possible to have a better fix for hexo-log?

@stevenjoezhang
Copy link
Member

Yes, I need some time to study how these codes work in 2019 ([email protected] with [email protected]).

@tisonkun
Copy link
Author

Aha. The logic in reference seems relatively fresh hexojs/hexo-log#107.

@stevenjoezhang
Copy link
Member

PR opened: hexojs/hexo-log#110

@tisonkun
Copy link
Author

Closed in favor of hexojs/hexo-log#110. I'm glad to test once it's released or if I know how to test it as a developer.

@tisonkun tisonkun closed this Aug 18, 2022
@tisonkun tisonkun deleted the patch-1 branch August 18, 2022 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants