colbeseder_1156
May 29, 2013Nimbostratus
Delete individual logs - iRule
I want to send emails from my iRule. And I am and it's working.
I have an iRule that writes logs. I have an alert that sends an email when it sees a matching log. So far, so good.
But I don't want my log file to be full of these emails. So in my alert, I also want to delete the log. I'm doing it like this:
exec command="sed -i 's/.*SENDMAIL.*[\r\n]*//' /var/log/ltm";
This does remove the line. But then I can't write any more logs. Why is that and how can I prevent / fix it?