I want to verify some logs logged. I am using the asp.net core built-in ILogger, and inject it with the asp.net core built-in DI:
private readonly ILogger<
For those trying to receive a callback for the log calls:
mock.Mock>() .Setup(x => x.Log( LogLevel.Information, It.IsAny(), It.IsAny(), It.IsAny(), (Func)It.IsAny() ) ) .Callback( (level, eventid, state, ex, func) => { this.Out.WriteLine(state.ToString()); } );