Root > Reference > All Functions > ELogOpen

Procedure ELogOpen

Previous pageReturn to chapter overviewNext page   

Creates new log file.

 

Unit

ELogging

 

Syntax

 

Code (Delphi)

procedure ELogOpen(

const AFileName: String = ''

);

 

Parameters

AFileName [in]

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

 

Remarks

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).

 

Note

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.

 

Examples

 

Code (Delphi)

ExeName := ParamStr(0);

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

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

FullLogFileName := IncludeTrailingPathDelimiter(LogFolder) + LogFileName;

 

ELogOpen(FullLogFileName);

 

See also




Send feedback... Build date: 2018-11-26
Last edited: 2018-11-26
PRIVACY STATEMENT
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: https://www.eurekalog.com/help/eurekalog/topic_function_elogging_elogopen.php