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

Clear log files #97

Open
allysonsouza opened this issue Mar 29, 2016 · 5 comments
Open

Clear log files #97

allysonsouza opened this issue Mar 29, 2016 · 5 comments
Labels

Comments

@allysonsouza
Copy link

There's a option to clear the entire log file, or i need to create a batch to do that? (pointed here, in this issue: #29)

If I still need to create my own program to do that, someone can help me how to do this?

@steinhaug
Copy link

Are you looking for a trigger in the logfile to clear/flush the file or how do you mean?

@allysonsouza
Copy link
Author

Yes @steinhaug, exactly it, a action to clear the log file, I miss this button in SnakeTail

@snakefoot
Copy link
Owner

You can configure an external tool in SnakeTail that performs a delete operation of the monitored file.

@steinhaug
Copy link

I'm on windows and after I started using external tools I notice that when you launch the program it runs through the logfile triggering all my alarms which is intended for debugging while working... so I solved this one by creating a .cmd file

snaketail-clean-start.cmd

@echo off
echo "" > D:\path\to\snaketail.log 
start "" "C:\Program Files\SnakeTail\SnakeTail.exe" D:\path\to\snaketail-session.xml
exit

Then I added a windows shortcut to the cmd file "snaketail-clean-start.cmd" and voila. Hope this helps

@allysonsouza
Copy link
Author

Just if someone comes here searching for that too, here's my batch script to clear the current open file:

echo off

set filepath=%1
set filename=%2

break > %filepath%\%filename%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants