Ejemplo n.º 1
0
 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")));
 }
Ejemplo n.º 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")));
     }
 }