Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLogFileProvider.WriteToStream AutoFlush check #113

Closed
avpnvpn opened this issue May 28, 2024 · 1 comment
Closed

TLogFileProvider.WriteToStream AutoFlush check #113

avpnvpn opened this issue May 28, 2024 · 1 comment

Comments

@avpnvpn
Copy link

avpnvpn commented May 28, 2024

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

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

@exilon
Copy link
Owner

exilon commented May 29, 2024

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 exilon closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants