Hi,
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.
Hi,
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.
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'm a big fan of CodeSite, too, but if you're looking for free, how about OutputDebugString with either the Delphi IDE or DebugView from SysInternals.
http://stackoverflow.com/questions/72983/which-logging-library-is-better mentions the following of which only the last two are free.
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.
There is a port of the Java Log4J logging framework at sourceforge.
It is Currently based on log4j 1.2.12 and quite active, and very easy to use. It includes TLogODSAppender, TLogStreamAppender, TLogFileAppender, TLogRollingFileAppender.
Log4D project page at sourceforge
Writing appenders is straightforward, here is an example of a simple console appender:
unit LogConsoleAppender;
interface
uses
Log4D;
type
{ Send log messages to console output. }
TLogConsoleAppender = class(TLogCustomAppender)
protected
procedure DoAppend(const Message: string); override;
end;
implementation
{ TLogConsoleAppender }
procedure TLogConsoleAppender.DoAppend(const Message: string);
begin
if IsConsole then
Write(Message);
end;
initialization
RegisterAppender(TLogConsoleAppender);
end.