Hello,
I think the best is to create a user object
which open a file (in LineMode!) when instanciated and close it when destroyed, with a fileWrite function.
Declare it as a global, and each time you need, just call the write function.
user object : uo_Log
uo_log instance variable
--> int ii_fileNumber
uo_Log::constructor
--> ii_fileNumber = FileOpen(FileName,LineMode!,Write!,LockWrite!,Append!)
uo_Log::uof_WriteLog(string as_Text)
--> FileWrite(ii_FileNumber,as_Text)
uo_Log::destructor
--> FileClose(ii_fileNumber)
Global variable
--> uo_Log MyLog
Application::constructor
--> MyLog = Create uo_Log
Each time you need
--> MyLog.uof_WriteLog("Hello World"
Hope it will be helpfull
Thierry