diff --git a/src/Serilog/Core/ForContextExtension.cs b/src/Serilog/Core/ForContextExtension.cs index b24ac9186..d74bac4e6 100644 --- a/src/Serilog/Core/ForContextExtension.cs +++ b/src/Serilog/Core/ForContextExtension.cs @@ -30,9 +30,9 @@ public static ILogger ForContext( 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; } } }