/[xmltv_parser]/trunk/libxmltv/Core/xmltv_logger.cs
ViewVC logotype

Contents of /trunk/libxmltv/Core/xmltv_logger.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 55 - (show annotations) (download)
Fri Mar 8 10:19:32 2013 UTC (7 years, 7 months ago) by william
File size: 1469 byte(s)
+ upate for: Enterprise.Logging: 1.2.5.1

1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Windows.Forms;
6 using Enterprise.Logging;
7
8 namespace libxmltv.Core
9 {
10 internal class xmltv_logger
11 {
12 public static void Initialize()
13 {
14 try
15 {
16 string log_path = Application.StartupPath;
17 string log_filename = string.Format("{0}.log", typeof(xmltv_logger).Assembly.GetName().Name);
18 gLog.CreateLog(string.Format(@"{0}\{1}", log_path, log_filename), false, LogLevel.kLogLevel_All);
19 }
20 catch (Exception)
21 {
22 /*
23 This will always thrown an exception, if gLog was initialized prior to calling xmltv_logger.Initialize()
24 This is mostly here to allow us to initialize it, if it was not already initialized
25 */
26 }
27 }
28 public static void SetLogLevel(int loglvl) { SetLogLevel((LogLevel)loglvl); }
29 public static void SetLogLevel(LogLevel loglvl) { gLog.SetLogLevel(loglvl); }
30 public static ilogger Debug { get { return gLog.Debug; } }
31 public static ilogger Error { get { return gLog.Error; } }
32 public static ilogger Info { get { return gLog.Info; } }
33 public static ilogger Warn { get { return gLog.Warn; } }
34 public static ilog Verbose { get { return gLog.Verbose; } }
35 }
36 }

  ViewVC Help
Powered by ViewVC 1.1.22