| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.Linq;
 
- using System.Text;
 
- using System.IO;
 
- using log4net;
 
- using log4net.Config;
 
- namespace Common
 
- {
 
-     
 
-     
 
-     
 
-     public static class LogHelper
 
-     {
 
-         static LogHelper()
 
-         {
 
-             var logCfg = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config");
 
-             XmlConfigurator.ConfigureAndWatch(logCfg);
 
-         }
 
-         
 
-         
 
-         
 
-         
 
-         
 
-         public static void Error(Type t, Exception ex)
 
-         {
 
-             log4net.ILog log = log4net.LogManager.GetLogger(t);
 
-             if (log.IsErrorEnabled)
 
-                 log.Error("Error", ex);
 
-         }
 
-         
 
-         
 
-         
 
-         
 
-         
 
-         public static void Error(Type t, string msg)
 
-         {
 
-             log4net.ILog log = log4net.LogManager.GetLogger(t);
 
-             if (log.IsErrorEnabled)
 
-                 log.Error(msg);
 
-         }
 
-         
 
-         
 
-         
 
-         
 
-         
 
-         public static void Info(Type t, Exception ex)
 
-         {
 
-             log4net.ILog log = log4net.LogManager.GetLogger(t);
 
-             if (log.IsInfoEnabled)
 
-                 log.Info("Error", ex);
 
-         }
 
-         
 
-         
 
-         
 
-         
 
-         
 
-         public static void Info(Type t, string msg)
 
-         {
 
-             log4net.ILog log = log4net.LogManager.GetLogger(t);
 
-             if (log.IsInfoEnabled)
 
-                 log.Info(msg);
 
-         }
 
-     }
 
- }
 
 
  |