| AspNetExtensionsConfigureNLog Method (IHostingEnvironment, String) |
Note: This API is now obsolete.
Apply NLog configuration from XML config.
Namespace:
NLog.Web
Assembly:
NLog.Web.AspNetCore (in NLog.Web.AspNetCore.dll) Version: 5.3.13+628b0876960af3ee3454c99b7985dbb5e1c46bf0
Syntax [ObsoleteAttribute("Use UseNLog() on IHostBuilder / IWebHostBuilder, or AddNLogWeb() on ILoggingBuilder")]
public static LoggingConfiguration ConfigureNLog(
this IHostingEnvironment env,
string configFileRelativePath
)
<ExtensionAttribute>
<ObsoleteAttribute("Use UseNLog() on IHostBuilder / IWebHostBuilder, or AddNLogWeb() on ILoggingBuilder")>
Public Shared Function ConfigureNLog (
env As IHostingEnvironment,
configFileRelativePath As String
) As LoggingConfiguration
Dim env As IHostingEnvironment
Dim configFileRelativePath As String
Dim returnValue As LoggingConfiguration
returnValue = env.ConfigureNLog(configFileRelativePath)
[<ExtensionAttribute>]
[<ObsoleteAttribute("Use UseNLog() on IHostBuilder / IWebHostBuilder, or AddNLogWeb() on ILoggingBuilder")>]
static member ConfigureNLog :
env : IHostingEnvironment *
configFileRelativePath : string -> LoggingConfiguration
Parameters
- env
- Type: IHostingEnvironment
- configFileRelativePath
- Type: SystemString
relative path to NLog configuration file.
Return Value
Type:
LoggingConfigurationLoggingConfiguration for chaining
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IHostingEnvironment. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also