Closed wo80 closed 8 years ago
I'll take a look at it.
Sorry for the extremly long delay. The documentation for LogProvider states the reason:
/// <summary>
/// Add a logger
/// </summary>
/// <param name="logger">Add a logger (will be used for all classes that want to log)</param>
/// <remarks>
/// <para>
/// If you want to limit which classes a logger should be able to handle you need to use the other overload:
/// <see cref="Add(ILogger, ILoggerFilter)" />
/// </para>
/// </remarks>
public void Add(ILogger logger)
I don't know if this is a feature or a bug, but please have a look at the code example below, which gives the following output:
while I would expect
This is because
LogManager.GetLogger
returns aCompositeLogger
object containing both instances rather than the actual instance I registered. Is this intended? What would I have to change to get the desired logging behaviour?Here's the code: