NLog Logging Library

Target Members

Target overview

Public Instance Properties

Layout The text to be rendered.
Name The name of the target.

Public Instance Methods

FlushOverloaded. Flush any pending log messages (in case of asynchronous targets).
GetLayouts Gets the collection of Layout objects that are used by this target.
Initialize Initializes the target. Can be used by inheriting classes to initialize logging.
PopulateLayouts Adds all layouts used by this target to the specified collection.
PrecalculateVolatileLayouts Calls the Precalculate on each volatile layout used by this target.
ToString Returns the text representation of the object. Used for diagnostics.

Protected Instance Constructors

Target Constructor Creates a new instance of the logging target and initializes default layout.

Protected Instance Properties

CompiledLayout The compiled layout to be rendered.

Protected Instance Methods

InvalidateLayouts Invalidates the collection of layouts cached by GetLayouts.

Protected Internal Instance Methods

Close Closes the target and releases any unmanaged resources.
NeedsStackTrace Determines whether stack trace information should be gathered during log event processing. By default it calls NeedsStackTrace on the result of GetLayouts.
WriteOverloaded. Writes logging event to the log target. Must be overridden in inheriting classes.

See Also

Target Class | NLog Namespace