NLog Logging Library

TargetFactory.AddTarget Method 

[This is preliminary documentation and subject to change.]

Registers the specified target type to the factory under a specified name.

[Visual Basic]
Public Shared Sub AddTarget( _
   ByVal targetName As String, _
   ByVal targetType As Type _
)
[C#]
public static void AddTarget(
   string targetName,
   Type targetType
);

Parameters

targetName
The name of the target (e.g.
File
or
Console
)
targetType
The type of the new target

Remarks

The name specified in the targetName parameter can then be used to create target.

See Also

TargetFactory Class | NLog Namespace