Rabbot internal logging not working when using rabbot.configure
See original GitHub issueHi, I don’t seem to be able to get rabbot’s internal logging working (without a hack, see below)
When running my app, I see two seperate invokes of whistlepunk.configure
The first one comes at application start during the module import:
...rabbot config.js
var log = require( "./log" )( "rabbot.configuration" );
...rabbot log.js
var log = require( "whistlepunk" ).log;
log( {} );
module.exports = log;
Then there is a second call into whistlepunk.configure
when running rabbot.configure
to create my connection
...rabbot config.js
logger = require( "./log" )( config.logging || {} );
If I turn off the first whistlepunk.configure
by a hack
...rabbot log.js
//log( {} );
Then I do get the correct DEBUG statements coming after rabbot.configure
In both my tests, I do see whistlepunk Logger.prototype.logIt
calls
It just seems that the channel.publish( this.namespace, payload );
gets confused if there have been two seperate whistlepunk.configure
calls
Not sure if it a issue related to the two different versions of postal being used
https://github.com/arobson/rabbot/blob/master/package.json#L116 ^2.0.5 https://github.com/LeanKit-Labs/whistlepunk/blob/master/package.json#L57 1.x
Possibly a bug?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
@alonisser - it was an issue in machina but it’s patched now 👍 2.0.0 is available now, @djeeg and you can see an example of attaching logging streams here.
I believe that you can also just import
bole
into your lib and use it’s API to attach streams that way as well. It’s much, much simpler than whistlepunk (hence the switch).Finally got around to upgrading to 2.1.0. Logging works perfectly. Cheers!