[Logwatch-Devel] patch to removeheaders 1.14

David Baldwin david.baldwin at anu.edu.au
Thu Dec 22 19:42:36 MST 2005


I wrote a new filter (for pubcookie if anyone is interested - can contribute it) 
and the service name included white space "pubcookie login server". Patch to 
'removeheaders' script attached to handle that.

David.
-- 
=====================================================================+
David Baldwin                   mailto:David.Baldwin at anu.edu.au      |
Supercomputer Facility          URL: http://www.anu.edu.au/~u8611156 |
II Services, Huxley Building    Ph:  {intl+61+2 | (02)} 6125 0321    |
Australian National University  FAX: {intl+61+2 | (02)} 6125 8199    |
Canberra ACT 0200, AUSTRALIA  *======================================+
-------------- next part --------------
--- scripts/shared/removeheaders        30 Nov 2005 23:52:27 -0000      1.14
+++ scripts/shared/removeheaders        23 Dec 2005 02:38:11 -0000
@@ -17,8 +17,8 @@
 
 while (defined($ThisLine = <STDIN>)) {
     #First line is Solaris ID tag style -mgt
-    $ThisLine =~ s/^... .. ..:..:.. [^ ]* [^ ]*(\[\d*\])?: \[ID \d+( \w+\.\w+)?] //;
-    $ThisLine =~ s/^... .. ..:..:.. [^ ]* [^ ]*(\[\d*\])?: //;
+    $ThisLine =~ s/^... .. ..:..:.. [^ ]* [^\[]*(\[\d*\])?: \[ID \d+( \w+\.\w+)?] //;
+    $ThisLine =~ s/^... .. ..:..:.. [^ ]* [^\[]*(\[\d*\])?: //;
     # the following is for those logs that use the service name, but do not
     # append the ':' right after (for example, syslogd restart).  Presumably
     # OnlyService is called before RemoveHeaders, so this should only be done


More information about the Logwatch-Devel mailing list