pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
746 stars 144 forks source link

Fix exception objects not being logged properly #341

Closed Sharparam closed 6 years ago

Sharparam commented 6 years ago

Description

The order of arguments sent to _logger.Error in ExceptionHandlingMiddleware was incorrect, causing exception objects to not be logged properly. The exception object was passed in as a format parameter, but as the log message didn't contain any formatting placeholders, the exception object was lost in the resulting log output.

This change puts the exception object as the first argument, as the Error log method requires.

This fixes #340.

Check List

pardahlman commented 6 years ago

Nice catch, thanks a lot 👌

Sharparam commented 5 years ago

@pardahlman Any plans on a new release candidate to include this and possibly other fixes? It's getting increasingly difficult to debug issues with RawRabbit as it does not log the exceptions thrown in the current rc-5 release.