diff --git a/tracer/samples/AutomaticTraceIdInjection/MicrosoftExtensionsExample/MicrosoftExtensionsExample.csproj b/tracer/samples/AutomaticTraceIdInjection/MicrosoftExtensionsExample/MicrosoftExtensionsExample.csproj index 3735f9aa11e8..6d3bd94b4da7 100644 --- a/tracer/samples/AutomaticTraceIdInjection/MicrosoftExtensionsExample/MicrosoftExtensionsExample.csproj +++ b/tracer/samples/AutomaticTraceIdInjection/MicrosoftExtensionsExample/MicrosoftExtensionsExample.csproj @@ -8,7 +8,6 @@ - diff --git a/tracer/samples/AutomaticTraceIdInjection/MicrosoftExtensionsExample/Program.cs b/tracer/samples/AutomaticTraceIdInjection/MicrosoftExtensionsExample/Program.cs index 8c1581943a61..cdc7748ec556 100644 --- a/tracer/samples/AutomaticTraceIdInjection/MicrosoftExtensionsExample/Program.cs +++ b/tracer/samples/AutomaticTraceIdInjection/MicrosoftExtensionsExample/Program.cs @@ -17,24 +17,6 @@ public static IHostBuilder CreateHostBuilder(string[] args) { return Host.CreateDefaultBuilder(args) .ConfigureServices(services => services.AddHostedService()) -#if NETCOREAPP3_0_OR_GREATER - .ConfigureLogging(logging => - { - // The JsonFormatter used by NetEscapades.Extensions.Logging.RollingFile includes all properties - // if scopes are enabled - however, it requires .NET 3.0+ - // - // Additions to configuration: - // - used json format - // - enabled scopes - logging.AddFile(opts => - { - opts.IncludeScopes = true; // must include scopes so that correlation identifiers are added - opts.FileName = "log-MicrosoftExtensions-jsonFile"; - opts.Extension = "log"; - opts.FormatterName = "json"; - }); - }); -#else .ConfigureLogging(logging => { // Using Serilog with Microsoft.Extensions.Logging is supported, but uses the Serilog log injection @@ -45,7 +27,6 @@ public static IHostBuilder CreateHostBuilder(string[] args) .WriteTo.File(new JsonFormatter(), "Logs/log-Serilog-jsonFile.log") .CreateLogger()); }); -#endif } } }