On Wed, 30 Mar 2011, Graeme Geldenhuys wrote:

On 30/03/2011 01:05, cobines wrote:
OK, thanks both for answers. DbgOutThreadLog function seems useful,
but I need to write to console so I'll use DebugLn via Synchronize.

If you take a look at the tiOPF v2 available from SourceForge.net, it has tiLog, tiLogToGUI, tiLogToConsole, tiLogToEvent, tiLogToFile, tiLogToDebugServer etc...

No matter the final output, the Log(..) lines are all the same. There are even convenience log functions for outputting various variable types in a neatly formatter manner. You can even enable logging at runtime via a command line parameter, you can enable multiple output targets (eg: file and gui output). The logging is all thread safe, and some output targets have built-in cache so as not to slow down your application when you log a huge amount of data.

The tiOPF log units are quit independent, so your application doesn't need to be based on tiOPF classes just to use the logging facility.

I would not recommend using it, because this component hijacks the command-line 
options.

Michael.

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to