[Lazarus] Share a port through lazarus-ccr

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Mar 31 09:19:34 CEST 2009


On Mon, Mar 30, 2009 at 6:43 PM, Luiz Americo Pereira Camara
>
> The multilog package requires only a recent fpc. It's also possible to
> use under Delphi (The Delphi executable sends the messages to a file or
> to a viewer compiled with Lazarus). The "high 3rd party requirement" is
> for the complete viewer. A simple viewer requires only Lazarus.

Ah, sorry I miss understood. Thanks for the info..

> implemented the file and IPC (SimpleIPC) channels. Implementing a new
> (Console) channel is trivial. See the file channel.

I'll give that a try today... Anything to help debugging FPC
applications, seeing that the FPC debugging is in a sad state at the
moment.

> It also provides several helper methods to control with fine granularity
> what messages to send. Some of then can be seen at

That's what we do in tiOPF as well. We have various 'log severities'
defined. At compile time or runtime (via Visual Logger window) you can
change log severities to see more or less information come through.


> As example, it's possible to restrict to send only the messages that are
> called below a method/function call stack.

Can you explain this a bit more... Including the call stack.
Currently my major obsticle in event programming is debugging the call
stack. I often do the following as a quick fix...

procedure TMyform.SomeCall;
begin
  Log('>> TMyForm.SomeCall');
  { some code here}
  Log('<< TMyForm.SomeCall');
end;

I have improved on this slightly by using Interfaces. Create a
interface variable that on creations writes the ">> ...' line and when
the variable goes out of scope and gets destroyed, writes the '<< ...'
line automatically.

eg:
procedure TMyform.SomeCall;
var
  logger: ILogger;
begin
  logger := gLog.GetLogger('TMyForm.SomeCall');
  { some code here}
end;

But as you can see, it's not much of an improvement, because I now
need a local variable. :-(

A constant view of the callstack (say the last 20 calls) would be
pretty awesome. Anybody know if this is possible with GDB or MultiLog
etc?

>>  Even so, I might steal
>> some ideas from the core code and implement them in tiOPF's logging.
>
> Fell free to do it.

Already did. ;-)

I'll take a closer look at mulitlog. This project seems quite interresting.


Regards,
  - Graeme -


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




More information about the Lazarus mailing list