Skip to content

Commit 7a4f4f6

Browse files
Copilotsagilio
andcommitted
fix: pass exception to log formatter in MockLogger
Co-authored-by: sagilio <42855245+sagilio@users.noreply.github.com>
1 parent 16f3bc0 commit 7a4f4f6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Casbin.UnitTests/Mock/MockLogger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class MockLogger<T> : ILogger<T>
1717
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception,
1818
Func<TState, Exception, string> formatter)
1919
{
20-
string outPut = formatter(state, null);
20+
string outPut = formatter(state, exception);
2121
_testOutputHelper.WriteLine(outPut);
2222
Logs.Add((logLevel, exception, outPut));
2323
}

0 commit comments

Comments
 (0)