-
Notifications
You must be signed in to change notification settings - Fork 615
Closed
Labels
Description
It might be helpful to log exception/error cases from the .Net library to help in problem resolution. I think Common.Logging is a good candidate for this. It is a logging facade rather than a logging framework, so the user of RabbitMQ.Client can choose to use NLog, Log4net, etc. If nothing is configured specifically, Console.Logging logs NoOpLoggerFactoryAdapter.
Here's a perfect case in point from AutorecoveringConnection.cs:
catch (Exception e)
{
// TODO: logging
Console.WriteLine("BeginAutomaticRecovery() failed: {0}", e);
}
With common.logging:
catch (Exception e)
{
logger.Warn("BeginAutomaticRecovery() failed", e);
}
The logger would log all the details, including stack trace (configurable in the logging config file) about the exception.