-
Notifications
You must be signed in to change notification settings - Fork 521
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
Fix #5232: ConsoleLogger overwrites local log file for each line write~ #5275
Conversation
@adhiamboperes pls review it |
Hi @kmanikanta335, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
Hi @kmanikanta335, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
Hi @kmanikanta335, I'm going to mark this PR as stale because it hasn't had any updates for 7 days. If no further activity occurs within 7 days, it will be automatically closed so that others can take up the issue. |
Explanation
issue #5232
In this modified version, the logStream is a long-lived PrintWriter that remains open for the duration of the ConsoleLogger instance. The flush() method is called to ensure that the data is immediately written to the file. This should help with performance, and the log entries will be appended to the file instead of overwriting it.
Essential Checklist