Here are the examples of the csharp api MartinCostello.Logging.XUnit.XUnitLogger.IsEnabled(LogLevel) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
19
Source : XUnitLogger.cs
with Apache License 2.0
from martincostello
with Apache License 2.0
from martincostello
public void Log<TState>(LogLevel logLevel, EventId eventId, TState? state, Exception? exception, Func<TState?, Exception?, string?> formatter)
{
if (!IsEnabled(logLevel))
{
return;
}
if (formatter == null)
{
throw new ArgumentNullException(nameof(formatter));
}
string? message = formatter(state, exception);
if (!string.IsNullOrEmpty(message) || exception != null)
{
WriteMessage(logLevel, eventId.Id, message, exception);
}
}