Root > Reference > All Functions > ELog

Function ELog

Previous pageReturn to chapter overviewNext page   

Creates a new log entry.

 

Unit

ELogging

 

Syntax

 

Code (Delphi)

function ELog: IEurekaLogger;

overload;

 

procedure ELog(

const AMsg: String

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: String

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: PChar

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: Char

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: Integer

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: Word

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: LongWord;

const AAsHex: Boolean = False

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: UInt64;

const AAsHex: Boolean = False

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: Int64

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: Extended;

const ADigits: Integer = 2

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: Boolean

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: TPoint

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: TSmallPoint

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: TRect

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: TGUID

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: TObject

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: TExceptionPointers

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: TExceptionRecord

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: TContext

); overload;

 

procedure ELog(

const AMsg: String;

const AValue: TResponse

); overload;

 

Parameters

AMsg [in]

A message to log.

 

AValue [in]

A value to log.

 

AAsHex [in]

Indicate is value should be logged in hex format (like '0045FDA0'). Default is false.

 

ADigits [in]

Indicate how many digits should be listed after decimal separator (e.g. 2 means '0.00'). Default is 2.

 

Return value

Returns interface to manupulate new log entry.

 

Remarks

 

 

This function adds a new log entry. Use this function to add entries to log. You may alter created log entry (for example, change category, color, etc.) via methods of returned IEurekaLogger interface.

 

There are several overloads:   The overload without arguments will not log anything immediately - instead it returns IEurekaLogger logger to add customized entries.  The overload with a single AMsg argument will log text "as is".  The overload with AMsg and AValue will log text as "AMsg = AValue".

 

Examples

 

Code (Delphi)

ELog('Log started');

ELog('SomeVar', SomeVar);

 

Code (Delphi)

ELog.Category('My Category').Log('Log started');

ELog.Category('My Category').Log('SomeVar', SomeVar);

 

Code (Delphi)

ELog.Category('My Category').FontColor(clRed).Log('Log started');

ELog.Category('My Category').FontColor(clRed).Log('SomeVar', SomeVar);

 

See also




Send feedback... Build date: 2024-12-19
Last edited: 2024-12-19
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_elog.php