DiagnosticListenerTarget Class |
Namespace: NLog.Targets
The DiagnosticListenerTarget type exposes the following members.
Name | Description | |
---|---|---|
DiagnosticListenerTarget | Initializes a new instance of the DiagnosticListenerTarget class |
Name | Description | |
---|---|---|
ContextProperties |
Gets the array of custom attributes to be passed into the logevent context
(Inherited from TargetWithContext.) | |
EventName | ||
ExcludeProperties |
List of property names to exclude when IncludeEventProperties is true
(Inherited from TargetWithContext.) | |
IncludeCallSite |
Gets or sets a value indicating whether to include call site (class and method name) in the LogEventInfo (Inherited from TargetWithContext.) | |
IncludeCallSiteStackTrace |
Gets or sets a value indicating whether to include source info (file name and line number) in the LogEventInfo (Inherited from TargetWithContext.) | |
IncludeEventProperties |
Gets or sets the option to include all properties from the log events
(Inherited from TargetWithContext.) | |
IncludeGdc |
Gets or sets a value indicating whether to include contents of the GlobalDiagnosticsContext dictionary
(Inherited from TargetWithContext.) | |
IncludeScopeNested |
Gets or sets whether to include the contents of the ScopeContext nested-state-stack.
(Inherited from TargetWithContext.) | |
IncludeScopeProperties |
Gets or sets whether to include the contents of the ScopeContext properties-dictionary.
(Inherited from TargetWithContext.) | |
IsInitialized |
Gets a value indicating whether the target has been initialized.
(Inherited from Target.) | |
Layout |
Gets or sets the layout used to format log messages.
(Inherited from TargetWithContext.) | |
LevelName | ||
LoggingConfiguration |
Gets the logging configuration this target is part of.
(Inherited from Target.) | |
Name |
Gets or sets the name of the target.
(Inherited from Target.) | |
SourceName | ||
SyncRoot |
Gets the object which can be used to synchronize asynchronous operations that must rely on the .
(Inherited from Target.) |
Name | Description | |
---|---|---|
CaptureContextGdc |
Takes snapshot of GlobalDiagnosticsContext for the LogEventInfo (Inherited from TargetWithContext.) | |
CaptureScopeContextNested |
Takes snapshot of nested states from ScopeContext for the LogEventInfo (Inherited from TargetWithContext.) | |
CaptureScopeContextProperties |
Takes snapshot of ScopeContext dictionary for the LogEventInfo (Inherited from TargetWithContext.) | |
CloseTarget | (Overrides TargetCloseTarget.) | |
Dispose |
Closes the target.
(Inherited from Target.) | |
Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources.
(Inherited from Target.) | |
Flush |
Flush any pending log messages (in case of asynchronous targets).
(Inherited from Target.) | |
FlushAsync |
Flush any pending log messages
(Inherited from Target.) | |
GenerateUniqueItemName |
Generates a new unique name, when duplicate names are detected
(Inherited from TargetWithContext.) | |
GetAllProperties(LogEventInfo) |
Creates combined dictionary of all configured properties for logEvent
(Inherited from TargetWithContext.) | |
GetAllProperties(LogEventInfo, IDictionaryString, Object) |
Creates combined dictionary of all configured properties for logEvent
(Inherited from TargetWithContext.) | |
GetContextProperties(LogEventInfo) |
Checks if any context properties, and if any returns them as a single dictionary
(Inherited from TargetWithContext.) | |
GetContextProperties(LogEventInfo, IDictionaryString, Object) |
Checks if any context properties, and if any returns them as a single dictionary
(Inherited from TargetWithContext.) | |
GetScopeContextNested |
Returns the captured snapshot of nested states from ScopeContext for the LogEventInfo (Inherited from TargetWithContext.) | |
GetScopeContextProperties |
Returns the captured snapshot of ScopeContext dictionary for the LogEventInfo (Inherited from TargetWithContext.) | |
InitializeTarget |
Initializes the target before writing starts
(Inherited from Target.) | |
PrecalculateVolatileLayouts |
Calls the Precalculate(LogEventInfo) on each volatile layout
used by this target.
This method won't prerender if all layouts in this target are thread-agnostic.
(Inherited from Target.) | |
RenderLogEvent(Layout, LogEventInfo) |
Renders the logevent into a string-result using the provided layout
(Inherited from Target.) | |
RenderLogEventT(LayoutT, LogEventInfo, T) |
Renders the logevent into a result-value by using the provided layout
(Inherited from Target.) | |
ResolveServiceT |
Resolve from DI ServiceRepository (Inherited from Target.) | |
SerializeItemValue |
Take snapshot of a single object value
(Inherited from TargetWithContext.) | |
SerializeScopeContextNestedState |
Take snapshot of a single object value from ScopeContext nested states
(Inherited from TargetWithContext.) | |
SerializeScopeContextProperty |
Take snapshot of a single object value from ScopeContext dictionary
(Inherited from TargetWithContext.) | |
ShouldIncludeProperties |
Check if logevent has properties (or context properties)
(Inherited from TargetWithContext.) | |
ToString | Returns a string that represents the current object. (Inherited from Target.) | |
Write(AsyncLogEventInfo) |
Writes async log event to the log target.
(Inherited from Target.) | |
Write(IListAsyncLogEventInfo) |
Writes an array of logging events to the log target. By default it iterates on all
events and passes them to "Write" method. Inheriting classes can use this method to
optimize batch writes.
(Inherited from Target.) | |
Write(LogEventInfo) | (Overrides TargetWrite(LogEventInfo).) | |
WriteAsyncLogEvent |
Writes the log to the target.
(Inherited from Target.) | |
WriteAsyncLogEvents(AsyncLogEventInfo) |
Writes the array of log events.
(Inherited from Target.) | |
WriteAsyncLogEvents(IListAsyncLogEventInfo) |
Writes the array of log events.
(Inherited from Target.) | |
WriteAsyncThreadSafe(AsyncLogEventInfo) |
Writes a log event to the log target, in a thread safe manner.
Any override of this method has to provide their own synchronization mechanism.
!WARNING! Custom targets should only override this method if able to provide their
own synchronization mechanism. Layout-objects are not guaranteed to be
thread-safe, so using them without a SyncRoot-object can be dangerous.
(Inherited from Target.) | |
WriteAsyncThreadSafe(IListAsyncLogEventInfo) |
Writes an array of logging events to the log target, in a thread safe manner.
Any override of this method has to provide their own synchronization mechanism.
!WARNING! Custom targets should only override this method if able to provide their
own synchronization mechanism. Layout-objects are not guaranteed to be
thread-safe, so using them without a SyncRoot-object can be dangerous.
(Inherited from Target.) | |
WriteFailedNotInitialized |
LogEvent is written to target, but target failed to successfully initialize
(Inherited from Target.) |