TMS Logging is a compact cross-platform logging framework offering informative log output to a flexible number of targets with a minimum amount of code.
TMS Logging to EurekaLogIf you are using TMS Logging in your application - it may be useful to get TMS Logging output as part of your EurekaLog's crash reports, so you will get a better understanding of execution flow of your application before crash.
TMS Logging supports custom output handlers, so you may simply redirect all logging from TMS Logging to EurekaLog by:
uses
TMSLoggingEurekaLogOutputHandler unit can be found in \Source\Extras\ folder of your EurekaLog installation. You can activate this output handler by using the usual construct:
TMSLogger.RegisterOutputHandlerClass(TEurekaLogOutputHandler);
This will create EurekaLog log file according to default rules. If you wish to specify file name or location - use ELogOpen function to open log file before registering output handler. In any case - EurekaLog log file will be automatically appended to crash report:
EurekaLog log file inside EurekaLog's crash report Double-click log file to view in viewer tool
Additionally, you may make a local copy (in other words, copy the file to your project) of TMSLoggingEurekaLogOutputHandler unit if you want to make modifications.
This approach is recommended over the alternative (see below), because it sends log in a formalized format, allowing for client-side manipulations in viewer tool.
TMS Logging to EurekaLog (alternative)You may attach TMS Logging output as file directly (without converting to EurekaLog's logging).
Note: TMS Logging only provide saving to text formats (text, HTML, CSV). That is why we recommend to use above mentioned method instead (when possible).
You can attach the log file from TMS Logging with the following code example:
Important Note: example below will add a new file with log output from TMS Logging. The new file will be added inside EurekaLog's bug report that is being send to developers. In other words, you have to set up sending to receive this file. The local EurekaLog's report do not store any additional files. If you wish to capture .elp file locally for testing purposes - see this example.
uses VCL.TMSLogging, // for TMS Logging routines ESysInfo, // for GetFolderTemp
When you receive crash report from EurekaLog - the TMS Logging log will be shown as file attach:
TMS Logging log file inside EurekaLog's crash report Double-click log file to view in your default assigned application (text editor)
EurekaLog to TMS LoggingAlternatively, you may want to set up a reverse integration. E.g. you may want to have EurekaLog's crash information inside your TMS Logging log files. Use example below:
uses VCL.TMSLogging, // for TMS Logging routines EException, // for TEurekaExceptionInfo EEvents; // for RegisterEventExceptionNotify // Tell EurekaLog to log crash info with TMS Logging AExceptionInfo.ExceptionMessage])); // Tell EurekaLog to log crash info with TMS Logging
See also:
|