Click or drag to resize
Target Class
Represents logging target.
Inheritance Hierarchy
SystemObject
  NLog.TargetsTarget
    More...

Namespace: NLog.Targets
Assembly: NLog (in NLog.dll) Version: 4.3.0
Syntax
public abstract class Target : IDisposable

The Target type exposes the following members.

Constructors
  NameDescription
Protected methodTarget
Initializes a new instance of the Target class
Top
Properties
  NameDescription
Protected propertyIsInitialized
Gets a value indicating whether the target has been initialized.
Protected propertyLoggingConfiguration
Gets the logging configuration this target is part of.
Public propertyName
Gets or sets the name of the target.
Protected propertySyncRoot
Gets the object which can be used to synchronize asynchronous operations that must rely on the .
Top
Methods
  NameDescription
Protected methodCloseTarget
Closes the target and releases any unmanaged resources.
Public methodDispose
Closes the target.
Protected methodDispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Public methodFlush
Flush any pending log messages (in case of asynchronous targets).
Protected methodFlushAsync
Flush any pending log messages asynchronously (in case of asynchronous targets).
Protected methodInitializeTarget
Initializes the target. Can be used by inheriting classes to initialize logging.
Protected methodMergeEventProperties
Merges (copies) the event context properties from any event info object stored in parameters of the given event info object.
Public methodPrecalculateVolatileLayouts
Calls the Precalculate(LogEventInfo) on each volatile layout used by this target.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Protected methodWrite(AsyncLogEventInfo)
Writes log event to the log target. Must be overridden in inheriting classes.
Protected methodWrite(AsyncLogEventInfo)
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.
Protected methodWrite(LogEventInfo)
Writes logging event to the log target. classes.
Public methodWriteAsyncLogEvent
Writes the log to the target.
Public methodWriteAsyncLogEvents
Writes the array of log events.
Top
See Also
Inheritance Hierarchy