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

fix(app-router): include error stack trace in logger #654

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

baerrach
Copy link

@baerrach baerrach commented Sep 5, 2019

@CLAassistant
Copy link

CLAassistant commented Sep 5, 2019

CLA assistant check
All committers have signed the CLA.

@baerrach baerrach force-pushed the fix/better-error-logging-926 branch from 72c3071 to ddfabfa Compare September 5, 2019 08:02
@baerrach
Copy link
Author

I'm hacking this locally and am preferring this option instead

logger.error(result.output);

It doesn't double print the error message string and I still get the stack trace.

@baerrach
Copy link
Author

Also, the output may or may not give object expansion toggles in your browser console. It appears to be browser specific.

This may only be a problem if you attach custom properties to your Errors and expect them to be inspectable in the console.

A workaround is to write your own implementation of the logger and use console.dir() if there's an error.

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.

better error logging
2 participants