Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-10

Logging class or some kind of writeln for Lazarus

5 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt
to Frank Church
Frank Church wrote
Are there some? FPC/Lazarus class for logging events?

Several:

- TEventLog writes to the system log or file.
Installed by default on tab System.
- I think there is also multilog in Lazarus CCR ?
- tiOPF contains tiLog. It writes to file, but is extensible.

Michael.

Reply by email

Thierry Coq
to Frank Church: Are there some FPC/Lazarus class for logging events? Frank Church =======================

There is also TLog4Delphi class. I don't know if it is ported to FPC yet.

Frank Church wrote 17 lines
Are there some FPC/Lazarus class for logging events? -- Frank Church ======================= http://devblog.brahmancreations.com -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20101023/ca23ccbe/attachment.html>

Reply by email

Graeme Geldenhuys
to Frank Church: Are there some FPC/Lazarus class for logging events? Frank Church =======================

Op 2010-10-22 20:47, Frank Church het geskryf:

Are there some FPC/Lazarus class for logging events?

Yes, tiOPF contains tiLog.pas unit and it's descendants. Even though your project isn't based on tiOPF object model, the tiLog units are separated and stand-alone, so you can us it in any application with ease.

tiOPF v2 includes:
- Log to File
- Log to Console
- Log to FPC Debug Server
- Log to System Log
- Log to GUI Window
- Log to Remote Server

...or any combination of the above.

I use the Log to GUI Window most. It also runs as a separate thread, and logging is cached - so as not to slow down your application. At runtime you see the window as your application starts. You can toggle at runtime which log events you want to see (eg: Debug, Normal, Sql, Database connections, Visitors etc...). There are many convenience functions for logging various data types (eg: TtiObject, TStringList, TDataTime, String, Integer, Double, etc..)

Due to the broken dbugintf (FPC/Lazarus Debug Server), and the broken/unimplemented FPC DWARF2/3, and limited Object Pascl support by GDB, an the many debugging limitations in Lazarus IDE, the tiOPF logging is by far the most reliable. Setting up a few simple Code Templates make adding log calls really quick.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net:8080/fpgui/

Reply by email