Logger doesn't seem to work with errors
See original GitHub issueI’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.
this.logger.log({msg: 'here we go', custom: 'yup'})
gets logged as
2018-03-21T00:37:34.131Z [LOG] {
"msg": "here we go",
"custom": "yup"
}
However if I do
error = new Error('Here is my error message');
this.logger.log(error);
I get
2018-03-21T00:40:54.334Z [LOG] {}
Which I imagine is because that is the result of JSON.stringify(error)
. Is this a known issue? Are there plans to fix it?
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
logging.info doesn't show up on console but warn and error do
The root logger always defaults to WARNING level. Try calling logging.getLogger().setLevel(logging.INFO). and you should be fine.
Read more >8 Python Logging Pitfalls to Avoid - Papertrail
The first pitfall on our list consists of using a too basic or simplistic approach to logging. In Python, this amounts to writing...
Read more >Log exception does not appear in Orchestrator
Hello, I have created a Library in order to log Try Catch exceptions across my Project. The library has an in parameter of...
Read more >Retrieving Error Messages - Omeka Classic User Manual
If Omeka Classic doesn't seem to be behaving correctly, for whatever reason, there are steps you can take to get more descriptive error...
Read more >A Step-by-Step Guide to Python Logging - Pylenin
Something does not look right") logging.error("You have encountered an error") ... Notice how logs with debug and info didn't get logged.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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.