Skip to content

Commit

Permalink
Simplify log
Browse files Browse the repository at this point in the history
  • Loading branch information
gumbarros committed Dec 17, 2024
1 parent 29e7c01 commit d6379d9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Commons/Logging/BatchingLogger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ public bool IsEnabled(LogLevel logLevel)
return loggerProvider.IsEnabled;
}

private void Log<TState>(DateTimeOffset timestamp, LogLevel logLevel, EventId eventId, TState state, Exception exception,
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception,
Func<TState, Exception, string> formatter)
{
var timestamp = DateTimeOffset.Now;
if (!IsEnabled(logLevel))
{
return;
Expand All @@ -48,10 +49,4 @@ private void Log<TState>(DateTimeOffset timestamp, LogLevel logLevel, EventId ev
LogLevel = logLevel
});
}

public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception,
Func<TState, Exception, string> formatter)
{
Log(DateTimeOffset.Now, logLevel, eventId, state, exception, formatter);
}
}

0 comments on commit d6379d9

Please sign in to comment.