Open allysonsouza opened 8 years ago
Are you looking for a trigger in the logfile to clear/flush the file or how do you mean?
Yes @steinhaug, exactly it, a action to clear the log file, I miss this button in SnakeTail
You can configure an external tool in SnakeTail that performs a delete operation of the monitored file.
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
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%
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?