ylu0105 opened a new issue, #278:
URL: https://github.com/apache/logging-log4net/issues/278

   static LogLog()
       {
   #if !NETCF
         try
         {
           InternalDebugging = 
OptionConverter.ToBoolean(SystemInfo.GetAppSetting("log4net.Internal.Debug"), 
false);
           QuietMode = 
OptionConverter.ToBoolean(SystemInfo.GetAppSetting("log4net.Internal.Quiet"), 
false);
           EmitInternalMessages = 
OptionConverter.ToBoolean(SystemInfo.GetAppSetting("log4net.Internal.Emit"), 
true);
         }
         catch (Exception ex)
         {
           // If an exception is thrown here then it looks like the config file 
does not
           // parse correctly.
           //
           // We will leave debug OFF and print an Error message
           Error(typeof(LogLog), "Exception while reading 
ConfigurationSettings. Check your .config file is well formed XML.", ex);
         }
   #endif
       }
   
   
   Because the SystemInfo.GetAppSetting method may cause an exception, it can 
lead to the failure of the QuiteMode property setting for the user.
   
   The following suggestions are for repair:
   
   static LogLog()
       {
   #if !NETCF
         try
         {
           QuietMode =true;
           InternalDebugging = 
OptionConverter.ToBoolean(SystemInfo.GetAppSetting("log4net.Internal.Debug"), 
false);
           QuietMode = 
OptionConverter.ToBoolean(SystemInfo.GetAppSetting("log4net.Internal.Quiet"), 
false);
           EmitInternalMessages = 
OptionConverter.ToBoolean(SystemInfo.GetAppSetting("log4net.Internal.Emit"), 
true);
         }
         catch (Exception ex)
         {
           // If an exception is thrown here then it looks like the config file 
does not
           // parse correctly.
           //
           // We will leave debug OFF and print an Error message
           Error(typeof(LogLog), "Exception while reading 
ConfigurationSettings. Check your .config file is well formed XML.", ex);
         }
   #endif
       }
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to