Skip to content

Commit

Permalink
enhanced unit tests, verifying 1) that the log method is only called …
Browse files Browse the repository at this point in the history
…when log level enabled 2) that the string function is only invoked when log level enabled
  • Loading branch information
ggnaegi committed Oct 27, 2023
1 parent c4f6dc9 commit 478f139
Show file tree
Hide file tree
Showing 2 changed files with 332 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/Ocelot/Logging/AspDotNetLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private string GetOcelotPreviousRequestId()
return requestId == null || requestId.IsError ? "no previous request id" : requestId.Data;
}

public void WriteLog(LogLevel logLevel, Func<string> messageFactory, Exception exception = null)
private void WriteLog(LogLevel logLevel, Func<string> messageFactory, Exception exception = null)
{
if (!_logger.IsEnabled(logLevel))
{
Expand Down
Loading

0 comments on commit 478f139

Please sign in to comment.