-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[dotnet] Overwrite internal log file if it already exists #13900
Conversation
PR Description updated to latest commit (7274501)
|
PR Review
✨ Review tool usage guide:Overview: The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.
See the review usage page for a comprehensive guide on using this tool. |
PR Code Suggestions
✨ Improve tool usage guide:Overview:
See the improve usage page for a comprehensive guide on using this tool. |
Open questions:
@diemol please suggest the best naming for point 1 |
As for me, the current implementation is good. |
I agree with @YevgeniyShunevych |
Can we merge this? |
We still need to agree whether existing file should be overwritten by default. |
I thought the conversation above meant the default was |
OK, then let's proceed if it is aligned with others bindings. |
Oh, wait. Good point. I was somehow not reading everything in detail. They all overwrite by default, except JS because it does not support sending logs to a file for now. So, yeah, good point @nvborisenko, it should be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @nvborisenko!
…#13900) * [dotnet] Optionally overwrite internal log file if it already exists * Overwrite log file by default --------- Co-authored-by: Diego Molina <diemol@users.noreply.github.com>
User description
Description
Added overload constructor for
FileLogHandler(string filePath, bool overwrite)
.Motivation and Context
Fixes #13860
Types of changes
Checklist
Type
Enhancement, Tests
Description
FileLogHandler
to support optional overwriting of log files.overwrite
parameter.Changes walkthrough
FileLogHandler.cs
Support Optional Overwriting in FileLogHandler
dotnet/src/webdriver/Internal/Logging/FileLogHandler.cs
overwrite the log file.
the file based on the
overwrite
parameter.FileLogHandlerTest.cs
Extend Tests for FileLogHandler Overwrite and Append Behaviors
dotnet/test/common/Internal/Logging/FileLogHandlerTest.cs
exist.