SF.net SVN: logwatch:[304] trunk
[email protected] Wed, 6 Jan 2016 19:19:09 +0000
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Revision: 304
http://sourceforge.net/p/logwatch/code/304
Author: stefjakobs
Date: 2016-01-06 19:19:09 +0000 (Wed, 06 Jan 2016)
Log Message:
-----------
make applymumbledate more generic; fix zypp date filter
Modified Paths:
--------------
trunk/conf/logfiles/zypp.conf
trunk/scripts/shared/applyeurodate
trunk/scripts/shared/applystddate
Modified: trunk/conf/logfiles/zypp.conf
===================================================================
--- trunk/conf/logfiles/zypp.conf 2016-01-06 19:08:05 UTC (rev 303)
+++ trunk/conf/logfiles/zypp.conf 2016-01-06 19:19:09 UTC (rev 304)
@@ -11,5 +11,5 @@
# you use wildcards...
Archive = zypp/history.*.gz
-*ApplyEuroDate
+*ApplyEuroDate = "%Y-%m-%d %H:%M:%S"
# vi: shiftwidth=3 tabstop=3 et
Modified: trunk/scripts/shared/applyeurodate
===================================================================
--- trunk/scripts/shared/applyeurodate 2016-01-06 19:08:05 UTC (rev 303)
+++ trunk/scripts/shared/applyeurodate 2016-01-06 19:19:09 UTC (rev 304)
@@ -45,7 +45,7 @@
my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
-$SearchDate = TimeFilter('%Y-%m-%d %H:%M:%S');
+$SearchDate = TimeFilter($ARGV[0] || '%Y-%m-%d %H:%M:%S ');
if ( $Debug > 5 ) {
print STDERR "DEBUG: Inside ApplyEuroDate...\n";
@@ -53,7 +53,7 @@
}
while (defined($ThisLine = <STDIN>)) {
- if ($ThisLine =~ m/^$SearchDate(,...)? /o) {
+ if ($ThisLine =~ m/^$SearchDate(,...)?/o) {
print $ThisLine;
}
}
Modified: trunk/scripts/shared/applystddate
===================================================================
--- trunk/scripts/shared/applystddate 2016-01-06 19:08:05 UTC (rev 303)
+++ trunk/scripts/shared/applystddate 2016-01-06 19:19:09 UTC (rev 304)
@@ -24,8 +24,8 @@
# customize the Timefilter by appending a string:
# *ApplyStdDate = "%H:%M %d/%m/%Y"
-$SearchDate = TimeFilter($ARGV[0] || '%b %e %H:%M:%S');
-$SearchDateRsyslog = TimeFilter('%Y-%m-%dT%H:%M:%S\.[0-9]+[+-][0-9]{2}:[0-9]{2}');
+$SearchDate = TimeFilter($ARGV[0] || '%b %e %H:%M:%S ');
+$SearchDateRsyslog = TimeFilter('%Y-%m-%dT%H:%M:%S\.[0-9]+[+-][0-9]{2}:[0-9]{2} ');
# The date might be "Dec 09", but it needs to be "Dec 9"...
#$SearchDate =~ s/ 0/ /;
@@ -37,12 +37,12 @@
}
while (defined($ThisLine = <STDIN>)) {
- if ($ThisLine =~ m/^$SearchDate /o) {
+ if ($ThisLine =~ m/^$SearchDate/o) {
print $ThisLine;
- } elsif ($ThisLine =~ /^$SearchDateRsyslog /o) {
+ } elsif ($ThisLine =~ /^$SearchDateRsyslog/o) {
$ThisLine =~ s/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})\.[0-9]+[+-][0-9]{2}:[0-9]{2} //o;
print POSIX::strftime("%b %e %H:%M:%S", $6, $5, $4, $3, $2-1, $1 - 1900) . " " . $ThisLine;
- } elsif ($ThisLine =~ m/(Mon|Tue|Wed|Thu|Fri|Sat|Sun) $SearchDate \d{4}/o) {
+ } elsif ($ThisLine =~ m/(Mon|Tue|Wed|Thu|Fri|Sat|Sun) $SearchDate\d{4}/o) {
print $ThisLine;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------