FileName property
|
acThreadSafeLog component.
|
property FileName: String;
|
The FileName property specifies the file to which the log should be written.
|
|
The file will be appended with some text every time when the application calls the Log method, if LogToFile property is True.
|
|
The component locks the specified file at run-time, so operating system will prevent to append or modify information in that file by other programs. It just opens the file when program starts, and close it when program terminates. However you can change the FileName dynamically at run-time (the component will unlock previous file to use another one).
|
|
Also, unfortunately the application can NOT use the same log file from its several running instances (since the log file are locked by first application instance), so use acOnlyOne component to allow to run only one instance of your application.
|
|
If you would like to direct the output also to some Memo control, you can specify it to the Memo property and set LogToMemo property to True.
|
FlushBuffers, Memo, LogToFile, LogToMemo and Options properties;
|
Log and Flush methods;
|
acOnlyOne component.
|