Extension methods can’t override existing methods, so you would need to create/use new methods on ILog that chain to the underlying methods. For example DebugWithProperties(…) -> Debug()
Do these properties change much? Is there a reason you can’t set them on a global or thread context before the log calls and have them logged out that way? Rob From: Sheffield, Julie [mailto:julie_sheffi...@intuit.com] Sent: Thursday, August 19, 2010 12:47 PM To: Log4NET User Subject: RE: Using my own implementation of ILog I have some custom properties I want to stick in LoggingEvent.Properties. Can I do that with extension methods? From: Rob Prouse [mailto:r...@prouse.org] Sent: Thursday, August 19, 2010 12:38 PM To: 'Log4NET User' Subject: RE: Using my own implementation of ILog Before you go to too much work, what do you hope to achieve with your custom ILog? Can you achieve what you want another way like writing or extending an appender, or possibly with extension methods? From: Sheffield, Julie [mailto:julie_sheffi...@intuit.com] Sent: Thursday, August 19, 2010 12:20 PM To: log4net-user@logging.apache.org Subject: Using my own implementation of ILog I see examples for extending the ILog interface that involve a custom version of the LogManager. However, is it possible simply to provide my own implementation of the standard ILog interface and configure the LogManager to return it? If so, how? I can certainly follow the examples and write my own LogManager, but I’d hate to do so unnecessarily. Thanks very much! Julie