'This is the function I call when I need to get the ILog object for logging Dim m_blnLogConfigured As Boolean Public Function GetConfiguredLog(ByVal LoggerName As System.Type) As log4net.ILog If Not m_blnLogConfigured Then m_blnLogConfigured = True log4net.Util.LogLog.InternalDebugging = System.Diagnostics.Debugger.IsAttached Dim AssemblyLocation As String = System.Reflection.Assembly.GetExecutingAssembly.Location Dim ConfigFilePath As String = IO.Path.Combine(IO.Path.GetDirectoryName(AssemblyLocation), "log4net.xml") log4net.Config.XmlConfigurator.Configure(New IO.FileInfo(ConfigFilePath)) End If Return log4net.LogManager.GetLogger(LoggerName) End Function
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.