rollbar.js icon indicating copy to clipboard operation
rollbar.js copied to clipboard

verbose: true not logging to console

Open guiconti opened this issue 8 years ago • 13 comments

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!

guiconti avatar Oct 23 '17 04:10 guiconti

I managed to fix it. I opened a PR #472

guiconti avatar Oct 23 '17 21:10 guiconti

https://github.com/Rollbar/rollbar.js/#verbose-option-1

rokob avatar Oct 23 '17 21:10 rokob

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 avatar Oct 23 '17 21:10 rokob

@rokob I submitted a PR #473 that remove the need to use debug for verbose loggin on node.js. Hope it helps.

guiconti avatar Oct 23 '17 23:10 guiconti

Getting the same issue on the web. Seems like enabled: false with verbose: true doesn't log anymore. Will try to investigate later.

dozoisch avatar Oct 31 '17 23:10 dozoisch

@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 avatar Dec 05 '17 13:12 rivkahstandig3636

@rivkahstandig3636 I'll update and report back! I'm most likely still on 2.2.9

dozoisch avatar Dec 05 '17 19:12 dozoisch

@rivkahstandig3636 I work with @dozoisch and we're no longer experiencing the issue, sorry for not reporting back, and thanks for your work! 👍

mathieumg avatar Dec 27 '17 15:12 mathieumg

No problem, thanks @mathieumg!

rivkahstandig3636 avatar Dec 27 '17 16:12 rivkahstandig3636

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

msmaromi avatar Sep 08 '19 04:09 msmaromi

@rivkahstandig3636 Probably a dumb question is 2.15.0(the latest) newer than 2.3? I still experience this on 2.15.0

isaiah-coleman avatar Mar 13 '20 14:03 isaiah-coleman

reopening for @waltjones

brianr avatar Mar 13 '20 17:03 brianr

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.

nlaffey-icario avatar May 12 '21 20:05 nlaffey-icario