 | FileLifecycleHooksOnTargetInitialize Method |
Namespace:
NLog.Targets
Assembly:
NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntaxpublic virtual void OnTargetInitialize(
FileTarget target
)
Public Overridable Sub OnTargetInitialize (
target As FileTarget
)
Dim instance As FileLifecycleHooks
Dim target As FileTarget
instance.OnTargetInitialize(target)
abstract OnTargetInitialize :
target : FileTarget -> unit
override OnTargetInitialize :
target : FileTarget -> unit 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