Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which logging library is better? [closed]

Tags:

logging

delphi

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

  • CodeSite
  • SmartInspect
  • Log4Delphi
  • TraceFormat

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.

like image 791
PatrickvL Avatar asked Sep 16 '08 14:09

PatrickvL


People also ask

Should you log in library?

Yes, you should log from your library code. It not only helps you develop, but the people who use the library will find it useful. Remember that you can always set the logging levels to only show the log statements you need - and they can do the same. Recently I was using Mybatis, an open source ORM tool.

What does a logging library do?

A logging library (or logging framework) is code that you embed into your application to create and manage log events. Logging libraries provide APIs for creating, structuring, formatting, and transmitting log events in a consistent way. Like agents, they're used to send events from your application to a destination.


4 Answers

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.

like image 159
mj2008 Avatar answered Oct 22 '22 02:10

mj2008


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.

like image 22
Jim McKeeth Avatar answered Oct 22 '22 03:10

Jim McKeeth


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!

like image 31
Arnaud Bouchez Avatar answered Oct 22 '22 04:10

Arnaud Bouchez


And don't forget the free open source TraceTool

like image 24
Lars Truijens Avatar answered Oct 22 '22 02:10

Lars Truijens