-
Notifications
You must be signed in to change notification settings - Fork 109
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
Logger doesn't seem to work with errors #46
Comments
Yeah. This is definitely something that can be handled better. Here is the line of code that is causing your problem: https://github.com/dbfannin/ngx-logger/blob/master/src/logger.service.ts#L150 In my current projects that use this library, I am always passing a |
@jensengar => What about the error are you expecting to be logged whenever you log an If you are expecting the |
Yeah, I think it would be ideal to log the stack because when that error goes up to the server, it would be great to be able to see what and where, rather than just what. I think it would probably be sufficient, at least for me if you did something like:
Any concerns with that? |
I'm happy to PR that if you wish. |
@jensengar => The
The only other way to get around this is to check for the |
It's true
For what I need right now though, I can't think of a case where Edit: I forgot to address the |
@jensengar => I'm glad that you like the library, but I am not the one who created it. I am just passionate about maintaining it (for now, that is). @dbfannin is the creator / primary maintainer. If you want to submit a pull request, I will review it for you. Otherwise, I will get a pull request opened when I get some free time. |
This issue is now fixed with @jensengar's PR. Version [email protected]. Thanks @th3n3wguy for helping guide this issue. |
Has this update been published to npm yet? And if not, when is the planned time for that? |
@jensengar, see comment above. version 2.0.4 |
I had an issue with the first time I published to 2.0.3, so I had to unpublish and bump the revision. |
I'm not sure if this is a new thing because I thought it worked before, but it seems whenever I try and log/warn/error an error object it just logs an empty object. My config is the same as you have in the readme, other than a different api url. Here's what happens when I try and log various things in the js console.
gets logged as
However if I do
I get
Which I imagine is because that is the result of
JSON.stringify(error)
. Is this a known issue? Are there plans to fix it?The text was updated successfully, but these errors were encountered: