public MaintenanceBase(INDLoggerFactory loggerFactory) { if (loggerFactory != null) { NDLoggerFactoryManger.AddFactory(loggerFactory.GetType().FullName.ToString(), loggerFactory); logger = NDLoggerFactoryManger.Instance; } }
static void Main(string[] args) { #region ND.Component.Log NDLoggerFactoryManger.AddFactory(LogCategory.NLog, new NLogLoggerFactory()); // NDLoggerFactoryManger.AddFactory(LogCategory.Custom, new CustomFileLoggerFactory()); // NDLoggerFactoryManger.AddFactory(LogCategory.Log4Net, new Log4NetLoggerFactory()); NDLoggerFactoryManger.Instance.Error("i am error2", 1); #endregion Console.WriteLine("ok"); Console.ReadKey(); }