Click or drag to resize

FileLifecycleHooksOnTargetInitialize Method

Called when the FileTarget is initialized.

Namespace:  NLog.Targets
Assembly:  NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntax
public virtual void OnTargetInitialize(
	FileTarget target
)

Parameters

target
Type: NLog.TargetsFileTarget
The FileTarget being initialized.
Remarks

This callback is invoked once for each initialization of the target.

The target can be used to inspect the target configuration when implementing custom initialization logic.

If this method throws an exception, initialization of the FileTarget may fail and the target may be disabled for output.

See Also