Skip to content
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
@andriysavin

Description

@andriysavin

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions