This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
FilterLogger should respect inner logger's IsEnabled #534
Closed
Description
Currently, at https://github.com/aspnet/Logging/blob/dev/src/Microsoft.Extensions.Logging.Filter/Internal/FilterLogger.cs#L27 only provided filter is respected. But this functionality will likely be used for integration with existing logging frameworks, which may have their own filtering system. Why not respect it at least like this:
public bool IsEnabled(LogLevel logLevel) { return _filter(logLevel) && _innerLogger.IsEnabled(logLevel); }
In other words, this filtering decorator should augment inner logger's filtering, not replace it.