示例#1
0
 public static ILogX NewLogger(Type logger)
 {
     if (instance == null)
     {
         instance = new LogX(logger);
     }
     return(instance);
 }
示例#2
0
 public static ILogX NewLogger()
 {
     if (instance == null)
     {
         instance = new LogX();
     }
     return(instance);
 }
示例#3
0
        static void Main(string[] args)
        {
            /*
             * ILog log = LogManager.GetLogger(typeof(AppDomain));
             *
             * log.Debug("这里是debug方法", new Exception("空指针异常"));
             * log.Info("这里是info方法",new Exception("空指针异常"));
             * log.Error("这里是error方法", new Exception("空指针异常"));
             * log.Fatal("这里是fatal方法", new Exception("空指针异常"));
             *
             */

            ILogX log = LogX.NewLogger();

            //log.IpAddr = "127.0.0.1";
            log.Error("这里扩展方法", new Exception("特殊异常"));
            Console.ReadKey();
        }