Exemple #1
0
 /// <summary>
 /// 加载配置。
 /// </summary>
 private void LoadConfig()
 {
     try
     {
         m_commandLogger = AppLogger.CreateInstance("CommandLogger");
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Create CommandLogger failed, " + ex.Message, ex);
     }
 }
 /// <summary>
 /// Constructor,按配置文件创建IAppLogger对象
 /// </summary>
 /// <param name="elementName">配置元素名称</param>
 public AppLoggerTraceListener(string elementName)
 {
     m_logger  = AppLogger.CreateInstance(elementName);
     m_IsOwner = true;
 }