Skip to content

Commit

Permalink
Merge pull request #242 from jods4/patch-1
Browse files Browse the repository at this point in the history
Minor optimisations
  • Loading branch information
nblumhardt authored Feb 14, 2024
2 parents 14c2965 + 76a05ee commit 8d20ade
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ LogEvent PrepareWrite<TState>(LogEventLevel level, EventId eventId, TState state

static object? AsLoggableValue<TState>(TState state, Func<TState, Exception?, string>? formatter)
{
object? stateObj = state;
object? stateObj = null;
if (formatter != null)
stateObj = formatter(state, null);
return stateObj;
return stateObj ?? state;
}

internal static LogEventProperty CreateEventIdProperty(EventId eventId)
Expand Down

0 comments on commit 8d20ade

Please sign in to comment.