Skip to content

Commit 5279b22

Browse files
authored
And also put code in right location
1 parent 0c8a5b2 commit 5279b22

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/log4net/Core/LoggerManager.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,12 @@ public static ILogger GetLogger(Assembly repositoryAssembly, Type type)
339339
/// </remarks>
340340
public static void Shutdown()
341341
{
342+
//Cleanup event handlers since they only call this mathod anyways
343+
AppDomain.CurrentDomain.ProcessExit -= OnProcessExit;
344+
AppDomain.CurrentDomain.DomainUnload -= OnDomainUnload;
345+
342346
foreach (ILoggerRepository repository in GetAllRepositories())
343-
{
344-
//Cleanup event handlers since they only call this mathod anyways
345-
AppDomain.CurrentDomain.ProcessExit -= OnProcessExit;
346-
AppDomain.CurrentDomain.DomainUnload -= OnDomainUnload;
347-
347+
{
348348
repository.Shutdown();
349349
}
350350
}

0 commit comments

Comments
 (0)