예제 #1
0
파일: App.cs 프로젝트: ledudu/XOutput
 private void SetLoggerConfiguration()
 {
     try
     {
         if (File.Exists("nlog.config"))
         {
             LogManager.Configuration = new XmlLoggingConfiguration(XmlReader.Create(File.OpenRead("nlog.config")));
             return;
         }
     }
     catch
     {
         // Cannot create logger
     }
     LogManager.Configuration = new XmlLoggingConfiguration(XmlReader.Create(AssemblyResourceManager.GetResourceStream("XOutput.Server.nlog.config")));
 }
예제 #2
0
 private void SetLoggerConfiguration()
 {
     try
     {
         if (File.Exists("nlog.config"))
         {
             LogManager.Configuration = new XmlLoggingConfiguration(XmlReader.Create(File.OpenRead("nlog.config")));
         }
     }
     catch
     {
         LogManager.Configuration = new XmlLoggingConfiguration(XmlReader.Create(AssemblyResourceManager.GetResourceStream("nlog.config")));
     }
 }