haf/log4net.RabbitMQ — pull request #15 by nabheet (2014-12-05 08:23:09+00:00)
Title: Fixed bug where topic was always 'text/plain' instead of the value specified in the config file

While stepping through the code, I discovered that the topic was always set to 'text/plain' because line 312 of RabbitMQAppenderBase.cs calls the Format(...) function of the RabbitMQAppender.cs class which always looks at the MessageProperties.ContentType property.

protected override string Format(LoggingEvent loggingEvent) {
return this.MessageProperties.ContentType.Format(loggingEvent);
}

I can change my code to whatever you prefer. But this is just a POC to highlight the problem.

Also, I can upgrade the Log4Net nuget package if you like too.