-
Notifications
You must be signed in to change notification settings - Fork 168
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
added truncate file option to context menu #146
base: Development
Are you sure you want to change the base?
added truncate file option to context menu #146
Conversation
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.
try to take the possible exceptions into account, and what happens if those occur, for instance IOException if the file, for whatever reason could not be open / written, etc.
src/LogExpert/Controls/LogTabWindow/LogTabWindowEventHandlers.cs
Outdated
Show resolved
Hide resolved
The easier way would be in my opinion to use the "external tools" feature. There you can launch any executable or e.g. cmd.exe with some commands. |
I can vote for the feature to truncate a log file! It will be very helpful. |
Release 1.9.0
added credits
updated the readme a bit
New update to this branch checks for the file lock and writes to status what the process holding the lock is named. Also, this is now described as "try to" truncate, because it is not guaranteed. This change only aims to address when exception may be thrown due to trying to exclusively obtain write lock on file that already has lock and would then cause an exception. |
sorry, I just saw, that you reverted the merge from development, thats why all the changes popup |
c123dc6
to
536840b
Compare
Added LockFinder project, to check processes holding file lock during truncate Added Status Line to tell user if something didn't work Renamed method and tooltip to indicate Truncate is not guaranteed
536840b
to
906befa
Compare
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.
sorry for the late answer, could you please add unit testcases, otherwise it looks ok
I had found myself deleting the log file(s) repeatedly to get clean view for certain log files, especially when filters would be capturing too much. This option to truncate that log file improved my workflow.