router icon indicating copy to clipboard operation
router copied to clipboard

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

Open baerrach opened this issue 6 years ago • 3 comments

closes aurelia/framework#926

baerrach avatar Sep 05 '19 06:09 baerrach

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 05 '19 06:09 CLAassistant

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 avatar Sep 10 '19 03:09 baerrach

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.

baerrach avatar Sep 10 '19 05:09 baerrach