Advertisement
RandomClear

How to add custom information into bug report

Jul 13th, 2015
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.94 KB | None | 0 0
  1. uses
  2.   EException,   // for TEurekaExceptionInfo
  3.   ELogBuilder,  // for RegisterEventCustomDataRequest and TBaseLogBuilder
  4.  
  5.   // EModules,  // for CurrentEurekaLogOptions
  6.   ESysInfo;     // for GetFileVersion
  7.  
  8. procedure AddMoreInfo(const ACustom: Pointer; AExceptionInfo: TEurekaExceptionInfo; ALogBuilder: TBaseLogBuilder; ADataFields: TStrings; var ACallNextHandler: Boolean);
  9. begin
  10.   ADataFields.Values['Application Version'] := GetFileVersion(ParamStr(0));
  11.   ADataFields.Values['Application License'] := {$IFDEF ENTERPRISE}'ENT'{$ELSE}'STD'{$ENDIF};
  12.   ADataFields.Values['Customer'] := 'Test';
  13. end;
  14.  
  15. initialization
  16.   RegisterEventCustomDataRequest(nil, AddMoreInfo);
  17.  
  18.   // Don't forget to include custom data in your bug report!
  19.  
  20.   // Open: Project / EurekaLog options / Bug report / Content
  21.   // Scroll down to bottom and enable "9. Custom data".
  22.  
  23.   // or do it programmatically:
  24.  
  25.   // CurrentEurekaLogOptions.soCustomData := True;
  26. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement