Root > How to... > ...add custom information to a bug report?

...add custom information to a bug report?

Previous pageReturn to chapter overviewNext page   

You can add simple text information or even arbitrary file(s). Text information will be included right inside .el bug report file, and can be viewed directly in Viewer ("General" tab when viewing report). Files can be added inside packed .elp bug report file, and can be opened by Viewer by double-clicking on file ("Files" tab when viewing report).

 

 

Custom file(s)

Register OnZippedFilesRequest event handler:

 

uses
  EEvents;
 
procedure AttachAdditionalFiles(const ACustom: Pointer; 
  AExceptionInfo: TEurekaExceptionInfo; 
  const ATempFolder: String
  AAttachedFiles: TStrings; 
  var ACallNextHandler: Boolean);
var
  FS: TFileStream;
  FileName: String;
begin
  // Option 1: attach existing file directly:
  AAttachedFiles.Add('C:\Windows\win.ini');
 
  // Option 2: create a new file:
  FileName := ATempFolder + 'MyCustomFile.bin';
  // All files in ATempFolder will be deleted after send
  AAttachedFiles.Add(FileName);
  FS := TFileStream.Create(FileName, fmCreate or fmShareDenyWrite);
  try
    FS.WriteBuffer({...});
  finally
    FreeAndNil(FS);
  end;
end;
 
initialization
  RegisterEventZippedFilesRequest(nil, AttachAdditionalFiles);
end.

 

 

Custom files inside bug report file

 

Double-click on file to open it in default application.

 

 

Custom text info

Register OnCustomDataRequest event handler:

 

uses
  EEvents;
 
procedure AddMyData(const ACustom: Pointer; 

                    AExceptionInfo: TEurekaExceptionInfo; 

                    ALogBuilder: TObject; 

                    ADataFields: TStrings; 

                    var ACallNextHandler: Boolean);
begin
  // Add your own information
  // Code below is just an example
  ADataFields.Values['Serial'] := ReadYourSerialNumberFromRegistry;
  ADataFields.Values['Used Database'] := 'none';

  ADataFields.Values['Logged on User'] := AExceptionInfo.ExpandEnvVars('%UserName%');
  // ...
end;
 
initialization
  RegisterEventCustomDataRequest(nil, AddMyData);
end.

 

or:

 

uses
  ELogBuilder;
 
procedure AddMyData(const ACustom: Pointer; 

                    AExceptionInfo: TEurekaExceptionInfo; 

                    ALogBuilder: TBaseLogBuilder; 

                    ADataFields: TStrings; 

                    var ACallNextHandler: Boolean);
begin
  // Add your own information
  // Code below is just an example

  ADataFields.Values['Serial'] := ReadYourSerialNumberFromRegistry;
  ADataFields.Values['Used Database'] := 'none';
  ADataFields.Values['Logged on User'] := AExceptionInfo.ExpandEnvVars('%UserName%');
  // ...
end;
 
initialization
  RegisterEventCustomDataRequest(nil, AddMyData);
end.

 

 

Custom text information in bug report

 

Note: you have to enable custom information for the bug report. It is already enabled by default, but you should double-check it just in case:

1. Go to Project / EurekaLog options;
2. Go to Bug Report / Content tab;
3. Scroll down to the end and enable "Custom information":

 

 

Enabling custom information for bug report

 

 

See also:




Send feedback... Build date: 2019-07-01
Last edited: 2019-06-18
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_add_information_to_bug_report.php