Yes, i wrote some functions in seperate modules that i load in a main script (if used)

This is the function
 Code:
Function WriteLog($LogMessage, optional $ScreenLog)
	$LogLine = $CurrentDate + " " + @TIME + " " + $LogMessage
	IF $ScreenLog <> 2
		$NUL = WRITELINE (5,$LogLine + @CRLF)
	ENDIF
	IF $ScreenLog > 0
		? $LogLine
	ENDIF
EndFunction


In the script i load the functions first from the logondrive
 Code:
Call @LDRIVE + "Fnt_Writelog.kx"


This Writelog function does allow me to chose which info is diplayed and/or logged.

I was mistaking in my previous post because i did not reviewed the latest logfile.
Using the $file.Name parameter does provide the name (in string context) to the logfile.



Edited by Dynamite Dan (2015-03-24 03:23 PM)