Root > Reference > Main routines > SetEurekaLogStateInThread

Function SetEurekaLogStateInThread

Previous pageReturn to chapter overviewNext page   

Enables or disables EurekaLog in the specified thread.

 

Unit

ExceptionLog7

 

Syntax

 

Code (Delphi)

function SetEurekaLogStateInThread(

const AThreadID: Cardinal;

const AActivate: Boolean

): Boolean;

 

Parameters

AThreadID [in, optional]

TID - thread ID which EurekaLog's status should be checked. Use 0 (default) for current thread.

 

AActivate [in]

True - if you want to enable EurekaLog, False - if you want to disable EurekaLog.

 

Return value

Previous EurekaLog state: True if EurekaLog was active, False - otherwise.

 

Remarks

You can use this procedure to manually enable and disable EurekaLog in the specified thread.

 

EurekaLog is considered to be active if it should do its work. You can get per-thread EurekaLog activation status by calling IsEurekaLogActiveInThread procedure.

 

This function changes per-thread activation status. If you want to change global activation status - use SetEurekaLogState procedure.

 

Note

This is a wrapper for EThreadsManager.SetEurekaLogStateInThread function.

 

Examples

 

Code (Delphi)

// Enable EurekaLog in current thread (by default)

SetEurekaLogStateInThread(True);

raise Exception.Create('Error message'); // <- this exception will be handled by EurekaLog, since EurekaLog is enabled

 

Code (Delphi)

// Disable EurekaLog in current thread

SetEurekaLogStateInThread(False);

raise Exception.Create('Error message'); // <- this exception will not be handled by EurekaLog, since EurekaLog is disabled

 

See also




Send feedback... Build date: 2024-09-30
Last edited: 2024-09-30
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_exceptionlog7_seteurekalogstateinthread.php