Delphi: Application error logging in the field

感情迁移 提交于 2019-12-12 07:35:31

问题


Using Delphi 7, I wonder if there is a free component which will collect diagnostic 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?


回答1:


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




回答2:


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




回答3:


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.




回答4:


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.




回答5:


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



来源:https://stackoverflow.com/questions/2918221/delphi-application-error-logging-in-the-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!