rollbar.js
rollbar.js copied to clipboard
verbose: true not logging to console
Hi, we are using rollbar on one of our node.js projects and we can not make it log info to console when we call debug, log, info, warning, error and critical. Here is where we declare rollbar:
const Rollbar = require('rollbar');
const rollbar = new Rollbar({
accessToken: process.env.ROLLBAR,
verbose: true,
captureUncaught: true,
captureUnhandledRejections: true,
payload: {
environment: process.env.NODE_ENV
}
});
rollbar.error('Why i don`t go to console?');
Is something wrong with the verbose option? We are using version 2.2.10 with node.js v8.4.0
Thank you!
I managed to fix it. I opened a PR #472
https://github.com/Rollbar/rollbar.js/#verbose-option-1
For node.js, verbose needs to be true AND you need to configure the debug package via an environment variable to log the output. This is how node_rollbar always worked and how rollbar.js on the server side has always worked. This has come up enough that I am now convinced this is overly confusing. I'm open to not using the debug module and just having the behaviour be that verbose: true implies logging to the console. I am not sure the reason behind using the debug module in the first place. Anyone out there opposed to that?
@rokob I submitted a PR #473 that remove the need to use debug for verbose loggin on node.js. Hope it helps.
Getting the same issue on the web. Seems like enabled: false with verbose: true doesn't log anymore. Will try to investigate later.
@dozoisch Are you still experiencing this issue? And if so, what version are you on? This issue should have been fixed as of v2.3.0
@rivkahstandig3636 I'll update and report back! I'm most likely still on 2.2.9
@rivkahstandig3636 I work with @dozoisch and we're no longer experiencing the issue, sorry for not reporting back, and thanks for your work! 👍
No problem, thanks @mathieumg!
Getting the same issue on the web. Seems like enabled: false with verbose: true doesn't log anymore. Will try to investigate later.
I actually still experience it
@rivkahstandig3636 Probably a dumb question is 2.15.0(the latest) newer than 2.3? I still experience this on 2.15.0
reopening for @waltjones
It looks like I'm experiencing this as well on 2.21.1. It appears verbose:true only logs to the console when enabled:true.