Skip to content

Commit

Permalink
Simplify ternary operation (not !)
Browse files Browse the repository at this point in the history
Relates to serilog#1002
  • Loading branch information
pardahlman committed Sep 30, 2017
1 parent 6dc8d8e commit 23f7710
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Serilog/Core/ForContextExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ public static ILogger ForContext<TValue>(
if (logger == null)
throw new ArgumentNullException(nameof(logger));

return !logger.IsEnabled(level)
? logger
: logger.ForContext(propertyName, value, destructureObjects);
return logger.IsEnabled(level)
? logger.ForContext(propertyName, value, destructureObjects)
: logger;
}
}
}

0 comments on commit 23f7710

Please sign in to comment.