 | AspNetExtensionsAddNLogWeb Method (IServiceCollection) |
Enable NLog as logging provider for Microsoft Extension Logging
Namespace:
NLog.Web
Assembly:
NLog.Web.AspNetCore (in NLog.Web.AspNetCore.dll) Version: 5.5.0+9fe9421708749962bac8393d7cec5df976518ccb
Syntaxpublic static IServiceCollection AddNLogWeb(
this IServiceCollection collection
)
<ExtensionAttribute>
Public Shared Function AddNLogWeb (
collection As IServiceCollection
) As IServiceCollection
Dim collection As IServiceCollection
Dim returnValue As IServiceCollection
returnValue = collection.AddNLogWeb()
[<ExtensionAttribute>]
static member AddNLogWeb :
collection : IServiceCollection -> IServiceCollection
Parameters
- collection
- Type: IServiceCollection
Return Value
Type:
IServiceCollectionIServiceCollection for chaining
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IServiceCollection. 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