diff --git a/src/NLog.Web.AspNetCore/AspNetExtensions.cs b/src/NLog.Web.AspNetCore/AspNetExtensions.cs index 077063ae..2479d020 100644 --- a/src/NLog.Web.AspNetCore/AspNetExtensions.cs +++ b/src/NLog.Web.AspNetCore/AspNetExtensions.cs @@ -28,7 +28,7 @@ public static class AspNetExtensions /// /// #if ASP_NET_CORE2 - [Obsolete("Use UseNLog() on IWebHostBuilder")] + [Obsolete("Use UseNLog() on IWebHostBuilder / IHostBuilder")] #endif public static void AddNLogWeb(this IApplicationBuilder app) { @@ -41,6 +41,9 @@ public static void AddNLogWeb(this IApplicationBuilder app) /// /// relative path to NLog configuration file. /// LoggingConfiguration for chaining +#if ASP_NET_CORE2 + [Obsolete("Use ConfigureNLog() on ILoggingBuilder. Or UseNLog() on IWebHostBuilder / IHostBuilder")] +#endif public static LoggingConfiguration ConfigureNLog(this IHostingEnvironment env, string configFileRelativePath) { ConfigurationItemFactory.Default.RegisterItemsFromAssembly(typeof(AspNetExtensions).GetTypeInfo().Assembly);