[Logwatch-Devel] CVS commits to logwatch.pl and others [HUGE WARNING]

Mike Tremaine mgt at stellarcore.net
Sun Sep 30 19:10:57 MST 2007

I committed my cvs tree tonight. But it is untested!!! Do not try to use 
CVS in production until I have at least tried it myself.

I will not post the diff for logwatch.pl because it is huge [I also 
committed onlyhost and hostlist]. I moved all the sub-routines to the 
bottom of the script [ I know some of you might hate this, sorry!] but I 
needed to be able to more easily follow the flow of the main program. 
I'll be adding more comments to the section so it will not be nearly so 
confusing trying to track some of this done.

Besides the somewhat annoying change I also re-worked the splithost 
multihost problem. What we have now is 2 new switches


hostformat is none, split, splitmail to allow for the concept of 
splithost and multiemail

hostlimit allows a comma separated list to be used to limit report to 
only those hosts listed.

This code should be working but... I have not tested it more then a 
"perl -d logwatch.pl"... I need the base changes in before I work out 
the final details.

Things that need to be tracked down still.

1) Check the matching in shared/onlyhost and shared/hostlist it seems 
like this might fail to match some log formats [it assume standard syslog.]

  $line =~ m/^... .. ..:..:.. $hostname\b/io)

2) onlyhost is called in parselogs, but with --hostlimit set it would be 
better to also call it in the pre-processor to cut the temp logfiles 
down to only what is really needed. As it stands --hostlimit used with 
--hostformat will not work correctly. This is known and will be fixed.

3) The manpages need to updated to reflect all these changes.

There are tons of comments tagged 8.0 which is were work has or is going 
on. Besides the three listed problems there are other issues that need 
to fix before 8.0 is here but at least it is getting closer. I hope to 
have these things put to rest this week and test on some real logs. 
Apologies to anyone who has been waiting on me and the slow rate of 


More information about the Logwatch-Devel mailing list