snaketail-net icon indicating copy to clipboard operation
snaketail-net copied to clipboard

Clear log files

Open allysonsouza opened this issue 8 years ago • 5 comments

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: https://github.com/snakefoot/snaketail-net/issues/29)

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

allysonsouza avatar Mar 29 '16 20:03 allysonsouza

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

steinhaug avatar May 16 '18 02:05 steinhaug

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

allysonsouza avatar May 16 '18 15:05 allysonsouza

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

snakefoot avatar May 16 '18 17:05 snakefoot

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

steinhaug avatar Jun 03 '18 18:06 steinhaug

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%

allysonsouza avatar Jun 04 '18 01:06 allysonsouza