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

I wish to add clear log menu option #111

Open
ghost opened this issue Apr 8, 2016 · 13 comments
Open

I wish to add clear log menu option #111

ghost opened this issue Apr 8, 2016 · 13 comments

Comments

@ghost
Copy link

ghost commented Apr 8, 2016

I would like to add "clear log" menu option that clears log files (erase all content but does not delete the file). Will such an feature be merged if I code it and create pull request?

@variar
Copy link
Contributor

variar commented Apr 22, 2016

In my opinion this would be quite strange for log viewer to be able to erase logs

@ghost
Copy link
Author

ghost commented Apr 23, 2016

This is quite usual for testers. You have to test out some behaviour of tested application then you try to reproduce behaviour but you did not succeed so you want to try again but you would like to have clean log file because if you have more logs it is harder to orient yourself in the file. Now I have to open console window and issue command like echo -n > logfile but it is somehow clumsy. That is why I want to add such option.

@gieniowski
Copy link

I would really love to have this feature implemented. I know that this is viewer, but quite often I want to start with clean log session in order to have clear overview of what is happening in app since some point. And I am talking from a developer point of view, so probably this feature could be useful not only for testers.

@bilbothebaggins
Copy link

I love it that I can confidently open a log file and be sure the tool doesn't mess with it. Keep that out of my log viewer, please.

@jeffjensen
Copy link

I regularly clear the log file while developing - I have the log file open in Notepad++ as well, switch to it, Ctrl-a, Delete, Ctrl-s.

Having a menu item to clear the log is a great feature for this, whether it only clears the memory buffer or actually removes the content. Perhaps two menu options for both.

@splinter89
Copy link

splinter89 commented Mar 22, 2018

For Windows, I ended up creating clear_php_error_log.bat in the Start menu which does the job.
I press Win, type "clear", Enter - done! No matter if glogg is open or not.
Console users might use alias.

@jeffjensen
Copy link

@splinter89 Nice idea for 1 or 2 log files; I have many (currently 18 tabs open in glogg) so this approach doesn't scale as well.

If no one wants the "clear log contents" option, how about a "run external tool" option that runs a command line? We can run a tool and pass the viewed file's full path file name as an argument... would save the hassle of launching editor, manually hunting for the log file, and manually deleting the contents.

@negora
Copy link

negora commented Jul 24, 2018

In my opinion, having the option of clearing the buffer (not the file) is a must when you use a log viewer for development. I would love that Glogg added something like that.

An alternative would be an option to add separators or markers manually. Something that allowed us to distinguish which log messages have been written since the last time we checked the log. The tool Multitail has that: it adds a line with red background and the current date in it.

@dia-susca
Copy link

I would also love this feature, it is extremely useful when developing on app servers with hundreds of deployments per day. At some point it becomes useful to "de-clutter" the logs.
Can it please be added?
You don't HAVE to clear log contents, and it doesn't have to be a button that can be accidentally clicked (like if it were next to Reload), but maybe just added as an Edit menu option?

@variar
Copy link
Contributor

variar commented Jan 20, 2019

After several years I've changed my mind. I'll add this feature as a menu item to clear the log file to my klogg fork and make a PR to glogg. Something more fancy like separators on log file reloads seems to require too much effort.

variar added a commit to variar/klogg that referenced this issue Feb 1, 2019
@variar
Copy link
Contributor

variar commented Feb 1, 2019

Can be tested in klogg builds >=19.01.0.337 (see releases)

@jeffjensen
Copy link

Can be tested in klogg builds >=19.01.0.337 (see releases)

Thank you for adding this feature! I've switched to Klogg and appreciate using it.

@AJolly
Copy link

AJolly commented May 21, 2024

I came here to file this as a bug, since obviously you would not be deleting a log file without a warning....

I was expecting clear to mean clear the screen, as it has in other log viewers I've used before. ex: Visual Syslog. Clear, control-x, clears the screen.

ie - Clear the screen visually but still have new file entries come in. I would have never expected this to delete the underlying data.

When I asked for help in the chat, other users told me that Klogg could NOT delete.

I suggest

  1. the menu be updated to be clear that "clear" means delete.
  2. There be some way for me to clear the log visually.

image

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

8 participants