go ahead... be a heretic | |
PerlMonks |
Rolling over a Parser Fileby ahuang14 (Novice) |
on Aug 08, 2011 at 15:12 UTC ( [id://919248]=perlquestion: print w/replies, xml ) | Need Help?? |
ahuang14 has asked for the wisdom of the Perl Monks concerning the following question: Hey guys, I was just wondering if there were any ideas about how to roll over a file that is parsing a continuous Snort log file. I am currently keeping Snort on 24/7 to log all network problems and then having a Perl program with Tail, parse out the information I need with each entry. However, I want to be able to have one file created each day, rather than having to manually do it myself. Right now I am basically Tailing the Snort file, parsing it, and appending it to a file x.log that I specify (just a simple text file). Is there a way to tell Perl to log for x hours or until x MB and then create a new file to append and write subsequent parsings to? Thanks in advance
Back to
Seekers of Perl Wisdom
|
|