log4net SDK Reference

LogManager.ShutdownRepository Method (Assembly)

Shuts down the repository specified.

[Visual Basic]
Overloads Public Shared Sub ShutdownRepository( _
   ByVal repositoryAssembly As Assembly _
)
[C#]
public static void ShutdownRepository(
   Assembly repositoryAssembly
);

Parameters

repositoryAssembly
The assembly to use to lookup the repository.

Remarks

Calling this method will safely close and remove all appenders in all the loggers including root contained in the repository. The repository is looked up using the repositoryAssembly specified.

Some appenders need to be closed before the application exists. Otherwise, pending logging events might be lost.

The shutdown method is careful to close nested appenders before closing regular appenders. This is allows configurations where a regular appender is attached to a logger and again to a nested appender.

See Also

LogManager Class | log4net Namespace | LogManager.ShutdownRepository Overload List