Hi Alex,

> private log4net.ILog _log;

I think this line is wrong. You use an Implementation of ILog for your
wrapper. This implementation will do the same checks, your
Implementation does and it sets the locationinfo onto your position
(from the point of the _log instance, your code is doing the logging).
Change the type to ILogger and log Messages like this:

private readonly static Type ThisDeclaringType = typeof(MyLog);
                virtual public void Debug(object message, Exception exception)
                {
                        Logger.Log(ThisDeclaringType, m_levelDebug, message, 
exception);
                }
                virtual public void DebugFormat(string format, params object[] 
args)
                {
                        if (IsDebugEnabled)
                        {
                                Logger.Log(ThisDeclaringType, m_levelDebug, new
SystemStringFormat(CultureInfo.InvariantCulture, format, args), null);
                        }
                }

I copied this code from LogImpl.cs and LoggerWrapperImpl.cs. It's a
damm good peace of code, and it's fun reading.

I hope this helps

Daniel

-- 
Daniel Marohn - mar...@sipgate.de
Telefon: +49 (0)211-63 55 55-0
Telefax: +49 (0)211-63 55 55-22
sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391
www.sipgate.de - www.sipgate.at - www.sipgate.co.uk

Reply via email to