QuickLogger icon indicating copy to clipboard operation
QuickLogger copied to clipboard

TLogFileProvider.WriteToStream AutoFlush check

Open avpnvpn opened this issue 1 year ago • 1 comments

TLogFileProvider.WriteToStream:
  if not fAutoFlush then fLogWriter.Flush;

Should it be this? if fAutoFlush then fLogWriter.Flush;

avpnvpn avatar May 28 '24 21:05 avpnvpn

No, only for file provider. AutoFlush = True means writes to file are controlled by OS, Autoflush = False means writes to disk occurs on every new log line (more agressive) If your application is critical and you don't want to lost any log line when your app crashes and log is not flushed fully to disk, you must set it to False. But I recommend use AutoFlush because is less agressive and better performance.

exilon avatar May 29 '24 17:05 exilon