diff --git a/src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLoggerProvider.cs b/src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLoggerProvider.cs index 3590071..f4daf8a 100644 --- a/src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLoggerProvider.cs +++ b/src/Serilog.Extensions.Logging/Extensions/Logging/SerilogLoggerProvider.cs @@ -2,12 +2,12 @@ // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; -using System.Threading; using Microsoft.Extensions.Logging; using Serilog.Core; using Serilog.Events; using FrameworkLogger = Microsoft.Extensions.Logging.ILogger; using System.Collections.Generic; +using System.Threading; using Serilog.Context; namespace Serilog.Extensions.Logging @@ -15,9 +15,7 @@ namespace Serilog.Extensions.Logging /// /// An that pipes events through Serilog. /// -#if LOGGING_BUILDER [ProviderAlias("Serilog")] -#endif public class SerilogLoggerProvider : ILoggerProvider, ILogEventEnricher { internal const string OriginalFormatPropertyName = "{OriginalFormat}"; @@ -92,14 +90,8 @@ public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory) internal SerilogLoggerScope CurrentScope { - get - { - return _value.Value; - } - set - { - _value.Value = value; - } + get => _value.Value; + set => _value.Value = value; } /// diff --git a/src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj b/src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj index 40b882d..479cb20 100644 --- a/src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj +++ b/src/Serilog.Extensions.Logging/Serilog.Extensions.Logging.csproj @@ -28,8 +28,4 @@ - - $(DefineConstants);ASYNCLOCAL;LOGGING_BUILDER - - diff --git a/src/Serilog.Extensions.Logging/SerilogLoggingBuilderExtensions.cs b/src/Serilog.Extensions.Logging/SerilogLoggingBuilderExtensions.cs index d7a3f5f..27bb6dd 100644 --- a/src/Serilog.Extensions.Logging/SerilogLoggingBuilderExtensions.cs +++ b/src/Serilog.Extensions.Logging/SerilogLoggingBuilderExtensions.cs @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#if LOGGING_BUILDER - using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; @@ -54,5 +52,3 @@ public static ILoggingBuilder AddSerilog(this ILoggingBuilder builder, ILogger l } } } - -#endif // LOGGING_BUILDER