Root > Reference > All Functions > ELogOpen

Procedure ELogOpen

Previous pageReturn to chapter overviewNext page   

Creates new log file.







Code (Delphi)

procedure ELogOpen(

const AFileName: String = ''




AFileName [in]

An absolute full file name for the new log file. We recommend to use .csl file extension.



This function creates new log file. Add subsequent calls to ELog-like functions will write to AFileName.


A call to this function should be the first call in your application (e.g. before you call any of other logging routines).



If you call any of ELog function before calling this function - log entries will be added to internal log. Internal log will be copied to real log file once you call ELogOpen.


If you do not want old entries created earlier - call ELogClear before calling ELogOpen.




Code (Delphi)

ExeName := ParamStr(0);

LogFileName := ChangeFileExt(ExtractFileName(ExeName), '.csl');

LogFolder := ExpandEnvVars('%APPDATA%'); // ESysInfo unit

FullLogFileName := IncludeTrailingPathDelimiter(LogFolder) + LogFileName;




See also

Send feedback... Build date: 2021-02-14
Last edited: 2021-02-14
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.

Permanent link to this article: