Click or drag to resize

NLogProviderOptions Class

Configuration options for the NLog Logging Provider with Microsoft Extension Logging
Inheritance Hierarchy
SystemObject
  NLog.Extensions.LoggingNLogProviderOptions
    NLog.WebNLogAspNetCoreOptions

Namespace:  NLog.Extensions.Logging
Assembly:  NLog.Extensions.Logging (in NLog.Extensions.Logging.dll) Version: 5.3.13+9106fa3b6a3bdf3fbae3d40dbd52b6c23eb3b9f3
Syntax
public class NLogProviderOptions

The NLogProviderOptions type exposes the following members.

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