Root > How to... > ...change EurekaLog's settings at run-time?

...change EurekaLog's settings at run-time?

Previous pageReturn to chapter overviewNext page   

EurekaLog options are represented by TEurekaModuleOptions class from EClasses unit. Each possible option is described in the description of EurekaLog Options dialog.

 

 

Option 1

Assuming you have EurekaLog's exception information object (e.g. inside event handler) - you can use .Options property:

 

{ ... } AExceptionInfo: TEurekaExceptionInfo; { ... }
 
AExceptionInfo.Options.SaveLogFile := False;

 

 

Option 2

Global options are returned by CurrentEurekaLogOptions function from EModules unit:

 

uses
  EModules; // for CurrentEurekaLogOptions
 
CurrentEurekaLogOptions.SaveLogFile := False;

 

Note: altering global options will not affect options of already raised exceptions. If you want to change options for a particular exception - obtain EurekaLog's exception information object for that exception and use .Options property (as shown in "option 1" above). E.g.:

 

uses
  EEvents;
 
procedure MyExceptionNotifyHandler(const ACustom: Pointer; 
  AExceptionInfo: TEurekaExceptionInfo; 
  var AHandle: Boolean; 
  var ACallNextHandler: Boolean);
begin
  CurrentEurekaLogOptions.SaveLogFile := False; // <- this is wrong!
  AExceptionInfo.Options.SaveLogFile := False;  // <- correct!
end;
 
initialization
  CurrentEurekaLogOptions.SaveLogFile := True; // <- correct!
  AExceptionInfo.Options.SaveLogFile := True;  // <- this is wrong!
 
  RegisterEventExceptionNotify(nil, MyExceptionNotifyHandler);
end.

 

 

See also:




Send feedback... Build date: 2018-11-26
Last edited: 2018-06-14
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/how_to_change_settings.php