diff --git a/src/Serilog/Context/LogContext.cs b/src/Serilog/Context/LogContext.cs index 34652e3a2..958886b13 100644 --- a/src/Serilog/Context/LogContext.cs +++ b/src/Serilog/Context/LogContext.cs @@ -63,14 +63,6 @@ public static class LogContext static readonly string DataSlotName = typeof(LogContext).FullName; #endif - /// - /// When calling into appdomains without Serilog loaded, e.g. via remoting or during unit testing, - /// it may be necesary to set this value to true so that serialization exceptions are avoided. When possible, - /// using the method in a using block around the call has a lower overhead and - /// should be preferred. - /// - public static bool PermitCrossAppDomainCalls { get; set; } - /// /// Push a property onto the context, returning an /// that can later be used to remove the property, along with any others that @@ -190,6 +182,14 @@ static ImmutableStack Enrichers #endif #if REMOTING + /// + /// When calling into appdomains without Serilog loaded, e.g. via remoting or during unit testing, + /// it may be necesary to set this value to true so that serialization exceptions are avoided. When possible, + /// using the method in a using block around the call has a lower overhead and + /// should be preferred. + /// + public static bool PermitCrossAppDomainCalls { get; set; } + static object GetContext(ImmutableStack value) { var context = !PermitCrossAppDomainCalls ? (object) value : new Wrapper