When logging with Log4Net it's very easy to put class that called the log into the log file. I've found in the past that this makes it very easy to trace through the code and see the flow through the classes. In Log4Net I use the %logger property in the conversion pattern like so:
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
And this gives me the output I want:
2008-09-19 15:40:26,906 [3132] ERROR Log4NetTechDemo.Tester [(null)] - Failed method
You can see from the output that the class that has called the log is Log4NetTechDemo.Tester, so I can trace the error back to that class quite easily.
In the Logging Applicaton Block I cannot figure out how to do this with a simple log call. Does anyone know how it can be done? If so, an example or steps to do so would be very helpful.
Thanks! Daniel