arobson / rabbot

Deprecated: Please see https://github.com/Foo-Foo-MQ/foo-foo-mq
MIT License
276 stars 129 forks source link

Rabbot duplicates bole output in debug mode #171

Open mariusmarais opened 6 years ago

mariusmarais commented 6 years ago

The combination of bole and debug works quite well for a simple logger, and it's used quite often.

Unfortunately rabbot automatically configures bole.output when loaded, causing debug messages to appear twice if another bole.output is called by another library or the app itself.

Would it be possible to not configure bole output automatically or make it more clever?

Had a couple of hours of fun trying to figure out why callbacks are always called twice... turns out only the logs were duplicated.

Workaround in an early hook script:

// Load rabbot early since it messes with bole
require('rabbot');
require('bole').reset();