Log4Net (Interop SharePoint)

Log4Net (Interop SharePoint)

You may find Log4Net needs to be initialised in order to grab the definitions in the XML file. If you use a Public Class or a Static Class this may cause some confusion because You’l need to initialise in ant method (XmlConfigurator), or not?


Use it like this

private static readonly ILog Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

Leave a Reply

Your email address will not be published.