We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Consider the following basic example of logging:
const bunyan = require("bunyan"); const log = bunyan.createLogger({ name: "test", src: true, }); log.info("test");
When run in Node 18, this produces the expected result:
ubuntu:~/git/bunyan-src-bug$ nvm use 18 Now using node v18.17.1 (npm v9.6.7) ubuntu:~/git/bunyan-src-bug$ node --version v18.17.1 ubuntu@ip-10-0-142-245:~/git/bunyan-src-bug$ node index.js {"name":"test","hostname":"redacted","pid":116506,"level":30,"msg":"test","time":"2023-09-02T22:45:14.794Z","src":{"file":"/home/ubuntu/git/bunyan-src-bug/index.js","line":8},"v":0}
However, when run in Node 20 it no longer logs a valid source:
ubuntu:~/git/bunyan-src-bug$ nvm use 20 Now using node v20.5.1 (npm v9.8.0) ubuntu:~/git/bunyan-src-bug$ node --version v20.5.1 ubuntu:~/git/bunyan-src-bug$ node index.js {"name":"test","hostname":"redacted","pid":116714,"level":30,"msg":"test","time":"2023-09-02T22:45:30.143Z","src":{},"v":0}
Note the empty object.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Consider the following basic example of logging:
When run in Node 18, this produces the expected result:
However, when run in Node 20 it no longer logs a valid source:
Note the empty object.
The text was updated successfully, but these errors were encountered: