开发者

Delphi: Application error logging in the field

开发者 https://www.devze.com 2023-01-01 00:12 出处:网络
Using Delphi 7, I wonder if there is a free component which will collect di开发者_如何学JAVAagnostic information as my application runs at a remote site and will help me to debug error reports.

Using Delphi 7, I wonder if there is a free component which will collect di开发者_如何学JAVAagnostic information as my application runs at a remote site and will help me to debug error reports.

Maybe it records each menu item selected, control clicked, text input, etc? Maybe it just dumps the stack on a crash. Maybe it does something else ...

I don't mind adding code (e.g at the start and end of each procedure), as that might generate more useful info than a fully automatic system.

I am not sure if the solution ought to "phone home" or if it is enough to produce a text file which can be emailed to me.

Any suggestions?


with the crash debuging have a look at MadExcept
http://www.madshi.net/madExceptDescription.htm

madExcept was built to help you locating crashes in your software. Whenever there's a crash/exception in your program, madExcept will automatically catch it, analyze it, collect lots of useful information, and give the end user the possibility to send you a full bug report.

free for non-commercial usage, inexpensive for commercial usage

or JclDebug from the JEDI Code Library

http://www.delphi-jedi.org/

A Blog Posting about it can be found here http://www.gnegg.ch/2002/12/jcldebug/

EDIT: This seems to be a very good example on how to use JCLDebug http://robstechcorner.blogspot.com/2009/04/finding-hard-to-reproduce-errors.html


I use EurekaLog http://www.eurekalog.com

It does the call stack, memory contents, other apps running, a good description of the machine, OS, patches, etc.., It can (with user permission, and if configured to to so) take a screenshot, ask the user for input (what were you doing when it crashed?), etc.. It can send the dump via e-mail, post to http, post directly to bug trackers like Mantis and FogBugz, or just leave it on the system. It's great, and well supported.

Also, here's a link to a similar question Compare Delphi Exception Handlers


Have you looked at the open-source JclDebug from Project Jedi? Here's a nice succinct write-up on JclDebug.

Imagine you could get a detailed error-report containing a full callstack of where the error occured combined with information about file and line-number. This report could be generated directly on the users computer and be sent to you via email or directly via the internet, using a custom procedure - even directly creating entries in the bugtracking-tool you are using.

This and more is made possible by the Project JEDI - more accuratly, the JCL-Subproject with its JclDebug-Framework. When you have completed the installation of the package, a new Menu Option called "Inser JCL Debug Data" will be added to the Project-Menu of your Delphi-IDE.


There is a great delphi porting of the most known opensource logging framework written in java, Log4J: it is called Log4Delphi.

http://log4delphi.sourceforge.net

I downloaded it, extended and used with my projects with success.

Best features: opensource, Apache license, very well documented, simple to extend it, power design: with the concept of appender, you could build up your custom appender and use it to send logging data from remote customer computer to your head quarter using UDP protocol.

Try it, and let me know :-)

PS: the project seems to be discontinued, but it is mature and I'd used it without memory overload and cpu overhead problems.


The log4Delphi project has been dormant for 4 years but I have been granted access to update the dormant Log4Delphi project and I have rolled up 4 years of bugfixes and patches into the latest 0.8 release available on Source-forge. I use this library in production and have found it to very stable and reliable and easy to use.

Log4Delphi Downloads Page

0

精彩评论

暂无评论...
验证码 换一张
取 消