| LoggingConfigurationAddTarget Method (String, Target) |
Registers the specified target object under a given name.
Namespace:
NLog.Config
Assembly:
NLog (in NLog.dll) Version: 5.3.4+73d83d3161d31288ca5c554cc50d27b6bed5f28b
Syntax public void AddTarget(
string name,
Target target
)
Public Sub AddTarget (
name As String,
target As Target
)
Dim instance As LoggingConfiguration
Dim name As String
Dim target As Target
instance.AddTarget(name, target)
member AddTarget :
name : string *
target : Target -> unit
Parameters
- name
- Type: SystemString
Name of the target. - target
- Type: NLog.TargetsTarget
The target object.
Exceptions Exception | Condition |
---|
ArgumentException | when name is |
ArgumentNullException | when target is |
See Also