Question

I was wondering; which logging libraries for Delphi do you prefer?

Please try to add a reasoning why you prefer one over the other if you've used more than one.

I'll add suggestions to this question to keep things readable.

Was it helpful?

Solution

SmartInspect is really useful. It is the only one I have used. The logging library is good, but the console and the remote TCP/IP logging takes it over the top. I think CodeSite has some similar features.

OTHER TIPS

I've used Codesite and it has been fantastic. On one project, a word-processor, I could easily output a million debug lines, all structured, and Codesite helped greatly with its auto-collapsing indented output. For any task where you have to know what really is happening "underneath" a process that can't be interrupted by user interaction, Codesite is really good. I recommend it heartily.

Take a look at the features of this Open Source unit: http://blog.synopse.info/post/2011/04/14/Enhanced-logging-in-SynCommons

  • logging with a set of levels (not only a hierarchy of levels);
  • fast, low execution overhead;
  • can load .map file symbols to be used in logging;
  • compression of .map into binary .mab (900 KB -> 70 KB);
  • optional inclusion of the .map/.mab into the .exe;
  • handle libraries (.ocx/.dll);
  • exception logging (Delphi or low-level exceptions) with unit names and line numbers;
  • optional stack trace with units and line numbers;
  • methods or procedure recursive tracing, with Enter and auto-Leave;
  • high resolution time stamps, for customer-side profiling of the application execution;
  • set / enumerates / TList / TPersistent / TObjectList / dynamic array JSON serialization;
  • per-thread, rotating or global logging;
  • multiple log files on the same process;
  • optional colored console display;
  • optional redirected logging (e.g. to third party library, or to a remote server);
  • log viewer GUI application, with per event or per thread filters, and method execution profiler;
  • Open Source, works from Delphi 5 up to XE6 (Win32 and Win64).

Your feedback is welcome!

And don't forget the free open source TraceTool

I have just updated Log4Delphi 0.8 on the Sourceforge page and it rolls up patches and bug fixes from the last 4 years.

Sourceforge Log4Delphi Downloads

Log4net/ports of Log4xxx to other languages. It's open-source, pretty wide-spread, popular, has a good community behind, and isused widel (for example, in Hibernate/nHibernate).

An important value behind CodeSite is Ray Kanopka's support. He personally answers emails and newsgroup posts, and has done so for many years. His answers often contain code that illustrates excellent coding habits.

I didn't use CodeSite probably because I'm completely happy with SmartInspect. Highly recommended.

I am looking into Codesite as well. I built my own in the past but I really like the featrues in Codesite. The Raize componenets are very well written and always quality stuff.

Log4D is another implementation which is based on Log4J and easy to extend and configure.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top