feat(logwatch): Update logwatch files for v3
Add new timestamp template and delete the old one. Update report script file to use new 'status' tags to generate logwatch reports.
This commit is contained in:
+4
-5
@@ -5,9 +5,8 @@
|
||||
##########################################################################
|
||||
|
||||
###############################################################################
|
||||
## Filter dates in full-date-time international format, surrounded by square
|
||||
## brackets located anywhere on a given line
|
||||
## Format: '[%Y-%m-%d %H:%M:%S]'
|
||||
## Filter dates in ISO-8601 format located at the start of a given line
|
||||
## Format: '%Y-%m-%dT%H:%M:%SZ'
|
||||
###############################################################################
|
||||
|
||||
use Logwatch ':dates';
|
||||
@@ -15,7 +14,7 @@ use Logwatch ':dates';
|
||||
my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
|
||||
|
||||
### Specify the format of the date/time stamp itself
|
||||
$SearchDate = TimeFilter('%Y-%m-%d %H:%M:%S');
|
||||
$SearchDate = TimeFilter('%Y-%m-%dT%H:%M:%SZ');
|
||||
|
||||
if ( $Debug > 5 ) {
|
||||
print STDERR "DEBUG: Inside FullDateTime...\n";
|
||||
@@ -24,7 +23,7 @@ if ( $Debug > 5 ) {
|
||||
|
||||
while (defined($ThisLine = <STDIN>)) {
|
||||
### specify the regex that defines how to find 'SearchDate'
|
||||
if ($ThisLine =~ m/\[$SearchDate\] /o) {
|
||||
if ($ThisLine =~ m/^$SearchDate /o) {
|
||||
print $ThisLine;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user