can anybody hint me a good, free Delphi logging framework? It should be easy to use and it should support different "log writers" including plain text, database and network.
相关问题
- Is there a Delphi 5 component that can handle .png
- Is there a way to install Delphi 2010 on Windows 2
- Is TWebBrowser dependant on IE version?
- I want to trace logs using a Macro multi parameter
- Error message 'No handlers could be found for
相关文章
- how do I log requests and responses for debugging
- Android Studio doesn't display logs by package
- Best way to implement MVVM bindings (View <-> V
- Windows EventLog: How fast are operations with it?
- How to force Delphi compiler to display all hints
- Coloring cell background on firemonkey stringgrid
- Stacktrace does not print in Glassfish 4.1 Cluster
- HelpInsight documentation in Delphi 2007
Which logging library is better? mentions the following of which only the last two are free.
I know it's not free - but well worth it's money: CodeSite by Raize Software. Quality has its price! :-)
I always enjoyed working with CodeSite, especially the ability to add just about any type of objects to the log without huge conversions to a string format was often very helpful.
Again: not free, but worth its price in gold, if you really are serious about production-quality logging and viewing of those logs.
Marc
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
There is Log4D, another port of the Java Log4J logging framework for Delphi at Sourceforge.
Log4D project page at sourceforge
A description of its architecture can be found on CodeCentral and here.
Help files are available online at http://cc.embarcadero.com/item/16446.
It is currently based on log4j 1.2.12 and quite active, and very easy to use. It includes TLogODSAppender, TLogStreamAppender, TLogFileAppender, TLogRollingFileAppender.
The following example project creates a ODS appender. If you run it in the IDE, the log messages will appear in the ‘Event log’ window.
Writing appenders is straightforward, here is an example of a simple console appender:
There is another new logging framework for Delphi, which comes in a single file (nxlogging.pas). nxlogging is a nice lightweight and powerful set of classes like log4d (appenders, formaters), but much easier tu use. It includes file appenders (rolling files, all in a single one, etc...) and a tcp appender too, so you can forward your logs to a central logserver.
Another alternative to Codesite is Overseer which is open sourced and part of the nexus project, but stands alone so does not require you to use their framework.