Click or drag to resize

NLogAspNetCoreOptions Class

Options for ASP.NET Core and NLog
Inheritance Hierarchy
SystemObject
  NLog.Extensions.LoggingNLogProviderOptions
    NLog.WebNLogAspNetCoreOptions

Namespace:  NLog.Web
Assembly:  NLog.Web.AspNetCore (in NLog.Web.AspNetCore.dll) Version: 5.3.13+628b0876960af3ee3454c99b7985dbb5e1c46bf0
Syntax
public sealed class NLogAspNetCoreOptions : NLogProviderOptions

The NLogAspNetCoreOptions type exposes the following members.

Constructors
  NameDescription
Public methodNLogAspNetCoreOptions
Initializes a new instance of the NLogAspNetCoreOptions class
Top
Properties
  NameDescription
Public propertyAutoShutdown
Automatically Shutdown NLog on AppDomain.Unload or AppDomain.ProcessExit
(Inherited from NLogProviderOptions.)
Public propertyCaptureEventId
Control capture of EventId as "EventId"-property.
(Inherited from NLogProviderOptions.)
Public propertyCaptureMessageParameters
Enable capture of Parameters from the ILogger-State-object. Only relevant when CaptureMessageTemplates = true
(Inherited from NLogProviderOptions.)
Public propertyCaptureMessageProperties
Enable capture of properties from the ILogger-State-object, both in Log``1(LogLevel, EventId, UMP, Exception, FuncUMP, Exception, String) and BeginScope``1(UMP)
(Inherited from NLogProviderOptions.)
Public propertyCaptureMessageTemplates
Enable structured logging by capturing message template parameters with support for "@" and "$". Enables use of ${message:raw=true}
(Inherited from NLogProviderOptions.)
Public propertyStatic memberDefault
The default options
Public propertyEventIdSeparator
Separator between for EventId.Id and EventId.Name. Default to _
(Inherited from NLogProviderOptions.)
Public propertyIgnoreEmptyEventId
Skip capture of EventId in Properties when default(EventId)
(Inherited from NLogProviderOptions.)
Public propertyIncludeActivityIdsWithBeginScope Obsolete.
Automatically include Activity.SpanId, Activity.TraceId and Activity.ParentId.
(Inherited from NLogProviderOptions.)
Public propertyIncludeActivtyIdsWithBeginScope Obsolete.
See IncludeActivityIdsWithBeginScope for documentation
(Inherited from NLogProviderOptions.)
Public propertyIncludeScopes
Enable capture of scope information and inject into ScopeContext
(Inherited from NLogProviderOptions.)
Public propertyLoggingConfigurationSectionName
Checks the Host Configuration for the specified section-name, and tries to load NLog-LoggingConfiguration after creation of NLogLoggerProvider
(Inherited from NLogProviderOptions.)
Public propertyParseMessageTemplates
Use the NLog engine for parsing the message template (again) and format using the NLog formatter
(Inherited from NLogProviderOptions.)
Public propertyRegisterHttpContextAccessor
Register the HttpContextAccessor when not yet registed. Default true
Public propertyRegisterServiceProvider
Enable NLog Targets and Layouts to perform dependency lookup using the Microsoft Dependency Injection IServiceProvider
(Inherited from NLogProviderOptions.)
Public propertyRemoveLoggerFactoryFilter
Resets the default Microsoft LoggerFactory Filter for the NLogLoggerProvider, and instead only uses NLog LoggingRules.
(Inherited from NLogProviderOptions.)
Public propertyReplaceLoggerFactory
Replace Microsoft LoggerFactory with a pure NLogLoggerFactory, and disables Microsoft Filter Logic and removes other LoggingProviders.
(Inherited from NLogProviderOptions.)
Public propertyShutdownOnDispose
Shutdown NLog on dispose of the NLogLoggerProvider
(Inherited from NLogProviderOptions.)
Top
See Also