using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using Enterprise.Logging; namespace libxmltv.Core { public class xmltv_logger { public static void Initialize() { try { string log_path = Application.StartupPath; string log_filename = string.Format("{0}.log", typeof(xmltv_logger).Assembly.GetName().Name); gLog.Initialize(string.Format(@"{0}\{1}", log_path, log_filename), false, LogLevel.kLogLevel_All); } catch (Exception) { /* This will always thrown an exception, if gLog was initialized prior to calling xmltv_logger.Initialize() This is mostly here to allow us to initialize it, if it was not already initialized */ } } public static iglog Log { get { return gLog.Log; } } } }