Author: bodewig
Date: Sun Mar 29 10:18:19 2015
New Revision: 1669887

URL: http://svn.apache.org/r1669887
Log:
When internal logging is on, manually shutdown and stderr/stdout
redirection is performed in log4net we get infinite loop.  This fixes
the stack overflow but doe snot fix the fact that logging is done after
the hierarchy was shutdown

Patch by Éric Daigneault
closes #14 by @Newtopian

Modified:
    logging/log4net/trunk/src/log4net/Repository/Hierarchy/Logger.cs

Modified: logging/log4net/trunk/src/log4net/Repository/Hierarchy/Logger.cs
URL: 
http://svn.apache.org/viewvc/logging/log4net/trunk/src/log4net/Repository/Hierarchy/Logger.cs?rev=1669887&r1=1669886&r2=1669887&view=diff
==============================================================================
--- logging/log4net/trunk/src/log4net/Repository/Hierarchy/Logger.cs (original)
+++ logging/log4net/trunk/src/log4net/Repository/Hierarchy/Logger.cs Sun Mar 29 
10:18:19 2015
@@ -599,6 +599,7 @@ namespace log4net.Repository.Hierarchy
                        //
                        if (!m_hierarchy.EmittedNoAppenderWarning && writes == 
0) 
                        {
+                               m_hierarchy.EmittedNoAppenderWarning = true;
                                LogLog.Debug(declaringType, "No appenders could 
be found for logger [" + Name + "] repository [" + Repository.Name + "]");
                                LogLog.Debug(declaringType, "Please initialize 
the log4net system properly.");
                                try
@@ -614,7 +615,6 @@ namespace log4net.Repository.Hierarchy
                                {
                                        // Insufficient permissions to display 
info from the AppDomain
                                }
-                               m_hierarchy.EmittedNoAppenderWarning = true;
                        }
                }
 


Reply via email to