Skip to content

Provide a logging abstraction #94

@rjrizzuto

Description

@rjrizzuto

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions