Click or drag to resize

LoggingConfigurationAddTarget Method (String, Target)

Registers the specified target object under a given name.

Namespace:  NLog.Config
Assembly:  NLog (in NLog.dll) Version: 5.5.0+1873145cbc26e0312d9481234d69ce7dc68aac4e
Syntax
public void AddTarget(
	string name,
	Target target
)

Parameters

name
Type: SystemString
Name of the target.
target
Type: NLog.TargetsTarget
The target object.
Exceptions
ExceptionCondition
ArgumentExceptionwhen name is
ArgumentNullExceptionwhen target is
See Also