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

Problem with error objects in meta (regression v2.3.0 -> v2.3.1) #1007

Closed
OrKoN opened this issue Apr 12, 2017 · 7 comments
Closed

Problem with error objects in meta (regression v2.3.0 -> v2.3.1) #1007

OrKoN opened this issue Apr 12, 2017 · 7 comments

Comments

@OrKoN
Copy link

OrKoN commented Apr 12, 2017

Hi,

we see a problem with [email protected]. Here is the gist reproducing it: https://gist.github.com/OrKoN/9c5b212058563043a94fa144d460d1d4

When run with winston 2.3.1, it outputs:

{"error":{},"@timestamp":"2017-04-12T07:19:26.456Z","level":"info","message":"test error in the key"}

When run with winston 2.3.0, it outputs:

{"error":{"message":"test","stack":"Error: test\n    at Object.<anonymous> (/Users/rudenol/winston-test/index.js:29:10)\n    at Module._compile (module.js:570:32)\n    at Object.Module._extensions..js (module.js:579:10)\n    at Module.load (module.js:487:32)\n    at tryModuleLoad (module.js:446:12)\n    at Function.Module._load (module.js:438:3)\n    at Module.runMain (module.js:604:10)\n    at run (bootstrap_node.js:394:7)\n    at startup (bootstrap_node.js:149:9)\n    at bootstrap_node.js:509:3"},"@timestamp":"2017-04-12T07:20:52.922Z","level":"info","message":"test error in the key"}

The latter one is the expected behavior in my opinion. I tried to trace it down and it seems cycle.decycle removes the error object from the meta.

Any idea why this happening?

Also if we use the normal Consol transport, then the error is empty in both 2.3.0 and 2.3.1. My node version is v6.9.4.

@dushyantbangal
Copy link

Do you think it is related to #1011 ?

@alechirsch
Copy link

+1

1 similar comment
@jeanfw
Copy link

jeanfw commented May 9, 2017

+1

@david-unergie
Copy link
Contributor

As far as I can see, this regression was brought by the PR #977.

gunar added a commit to invisible-tech/logger that referenced this issue Oct 25, 2017
@gunar
Copy link

gunar commented Oct 25, 2017

Affects v2.4.0 as well

@kabirbaidhya
Copy link

kabirbaidhya commented Mar 13, 2018

We're still getting this error on 2.3.6. Any update on when this is going to be fixed? The only option right now seems to downgrade to 2.3.0?

@indexzero
Copy link
Member

#1188 should fix this. A maintenance release will be made tomorrow.

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

No branches or pull requests

8 participants