Assembly: PostSharp.Patterns.Diagnostics.Backends.Log4Net (in PostSharp.Patterns.Diagnostics.Backends.Log4Net.dll) Version: 18.104.22.168 (22.214.171.124)
public class Log4NetCollectingRepositorySelector : IRepositorySelector
Thetype exposes the following members.
Initializes a new instance of RedirectLoggingToPostSharp() instead.and creates the relay repository. See Remarks on the class. Consider using the static method
If repositoryName corresponds to the "relay repository", returns that. Otherwise, returns a repository of the type .
Sets the globalto a log4net-to-PostSharp redirector so that all repositories and loggers created after this call redirect all messages to PostSharp. Returns a "relay repository" which is the only repository that won't be redirected to PostSharp.
ILoggerRepository relay = Log4NetRedirector.RedirectLoggingToPostSharp(); BasicConfigurator.Configure( relay ); LoggingServices.DefaultBackend = new Log4NetLoggingBackend(relay);
The first line also returns a "relay repository" which is the one repository where logging will not be redirected to PostSharp. On line 2, we configure appenders for this repository (you may want to usehere). On line 3, we pass that relay repository to PostSharp so that all PostSharp logging (automatic, manual, and the logging coming from log4net) goes into that relay repository and from there to your appenders.