question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rabbot internal logging not working when using rabbot.configure

See original GitHub issue

Hi, 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:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
arobsoncommented, Feb 18, 2018

@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).

0reactions
djeegcommented, Mar 29, 2018

Finally got around to upgrading to 2.1.0. Logging works perfectly. Cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logging
In modern releases, RabbitMQ nodes only log to a file if explicitly configured to do so using the configuration keys listed below: log.file:...
Read more >
How to use internal logging in RabbitMQ?
I first created a binding to my log queue with no routing key but that did not work. I recreated the binding with...
Read more >
Troubleshooting RabbitMQ
Log in with username "orion" and paste in the password to visit the RabbitMQ management console. By configuration, this console is not ......
Read more >
How to View & Aggregate RabbitMQ Logs
RabbitMQ provides two methods of changing the log level: via the configuration files or running a command using CLI tools. You can change...
Read more >
Rabbit.log contains "Channel error on connection" entries
The rabbit.conf file located in C:\ProgramData\lnl\RabbitMQ can be set to a higher logging level if you do not want errors of this kind...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found