Question

I have a simple console application using MassTransit. My bus is configured to use MSMQ.

var tx = ServiceBusFactory.New(sbc =>
{
    sbc.UseMsmq();
    sbc.UseMulticastSubscriptionClient();
    sbc.ReceiveFrom("msmq://localhost/test_q1");
    sbc.UseControlBus();
});

When I start the bus and send and receive messages, I see loads of JSON spewed out to the console. I'm assuming this is the data going over the wire but how do I configure this output and where it goes?

Was it helpful?

Solution

This was a bug in the NuGet version of MassTransit, a forgotten Console.Write that was being used to troubleshoot an issue. If you can pull the latest from the prerelease tag (using NuGet as well) that problem should go away.

And as Travis said above, regular logging (which does not include the JSON you're seeing) is configurable now and Log4Net and NLog are supported out of the box (along with the built-in trace appenders in the CLR).

OTHER TIPS

MassTransit currently uses log4net for all it's logging needs. Check out some example log4net configuration settings: http://logging.apache.org/log4net/release/config-examples.html

The next release of MassTransit will contain a logging abstraction, and you can register log4net, nlog, or a customer logger if you so desire.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top