[Logwatch-Devel] CVS update logwatch.pl please test

Mike Tremaine mgt at stellarcore.net
Wed Jan 4 11:01:46 MST 2006


I just committed the HTML and MIME::Base64 patches to logwatch.pl this
was pretty large re-write and it needs both testing and a few cleanups
but I wanted to get the majority of it out now. So for those braves
souls out there please give it a test.


Changes...

1) There is now a html dir in ~/default.conf/html which has header.html
and footer.html these get used by the HTML output. 

Todo: This needs to be able to be overridden by /etc/logwatch/conf/html/
Current you can change Config{html_header} and Config{html_footer} but I
did not look at how Bjorn was doing this so if someone [wink wink] can
fix that.

2) We now use MIME::Base64 and encode the output strings as needed IF
the option "--encode" is set. This works on both text and html

try

logwatch -o html --encode
logwatch --encode

Todo: I've got a buglet in there with the $Config{'encode'} option that
causes perl -w to kick out

Use of uninitialized value in substitution (s///) at /usr/sbin/logwatch line 119.
Argument "" isn't numeric in numeric eq (==) at /usr/sbin/logwatch line 907, <TESTFILE> line 3.

When encode is not used. Someone remind me what I did wrong, I just
added the code for this 20mins ago and have not tried to debug it yet.


3) Formating... I totally hacked apart the old out_* sub-routines there
is now a unified output(). In doing this and threw out a bunch of code
that seemed impossible to call. Some of it might have been added with
the intention of using it later and some of it might have been custom
formatting used by people much smarter then I.

Todo: Someone tell me if I wrecked any formatting outputs for them.

4) Custom HTML... 

Todo: The html line outputs [NOT HEADER AND FOOTER] still needs to be
worked on to be configurable outside of logwatch.pl. It was my intention
of making a services.html or html.conf file that has string values for
each type of possible line output with a $line anchor that gets swapped
for the real output.

Assume this feature is coming but I wanted to get the rest of it out
now.

-Mike



More information about the Logwatch-Devel mailing list