Sign in Join

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

Mailing lists / lazarus / 2015-04

Is it possible to change LazLogger to use unbuffered output?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Donald Ziesig

Hi All!

LazLogger is quite useful in debugging components, but it would be much more useful if the output were unbuffered such that lines written to DebugLn would show in the terminal immediately. Right now, only a portion of the debug output appears unless I append many dummy characters to the debug output to flush the output buffer. Otherwise I can't see all of my output until well after it has been written.

Don Ziesig

Reply by email

Martin Frb
to Donald Ziesig
Donald Ziesig wrote 8 lines
Hi All! LazLogger is quite useful in debugging components, but it would be much more useful if the output were unbuffered such that lines written to DebugLn would show in the terminal immediately. Right now, only a portion of the debug output appears unless I append many dummy characters to the debug output to flush the output buffer. Otherwise I can't see all of my output until well after it has been written.

You can look at the units and see if you can add any flushing anywhere.

There is

property LazLogger.CloseLogFileBetweenWrites : Boolean

So in your initialization: LazLogger.CloseLogFileBetweenWrites := True;

might help

Reply by email