You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Shireesh Thanneru <th...@yahoo.com> on 2005/08/25 02:07:31 UTC

Wrapping Log4Net with a Facade - How to get the correct Location Information

We are wrapping Log4Net with a home grown Facade along the lines of
sl4j. We are doing this basically for two reasons: to swap the
underlying logger (for e.g. replacing log4net with something else) and
to provide additional functionality at the Facade level (for example,
enforcing size limits for log messages, logging additional info
depending on the level, for e.g COM+ context info, etc). Everything is
working fine so far, but when log4net prints the
loggingEvent.LocationInformation, it is printing the Facade
location/caller information instead of the actual class that is logging
the message. What is the recommended way to solve this problem and
print the correct location information when we have a wrapper facade on
top of log4net?

Thanks,

Shireesh Thanneru