Click or drag to resize

FileLifecycleHooksOnFileClosed Method

Called after a log file has been closed by the FileTarget.

Namespace:  NLog.Targets
Assembly:  NLog (in NLog.dll) Version: 6.0.0+cfb73701cda54e2410b006f649f072e90daef707
Syntax
public virtual void OnFileClosed(
	string filePath
)

Parameters

filePath
Type: SystemString
The full path to the file that was closed.
Remarks

This is a per-file event. A FileTarget can have multiple files open simultaneously, and this method is invoked independently for each file when that file is closed.

The same file may be opened and closed multiple times during the lifetime of the target.

A file can be closed because of archiving, file cleanup, file cache management, or other FileTarget operations.

See Also