Blame logwatch.shared.applycyphesisdate
|
Michael Thomas |
79a2e45 |
##########################################################################
|
|
Michael Thomas |
79a2e45 |
# $Id: applyusdate,v 1.6 2005/10/22 00:19:56 bjorn Exp $
|
|
Michael Thomas |
79a2e45 |
##########################################################################
|
|
Michael Thomas |
79a2e45 |
|
|
Michael Thomas |
79a2e45 |
########################################################
|
|
Michael Thomas |
79a2e45 |
# This was written and is maintained by:
|
|
Michael Thomas |
79a2e45 |
# Kirk Bauer <kirk@kaybee.org>
|
|
Michael Thomas |
79a2e45 |
#
|
|
Michael Thomas |
79a2e45 |
# Please send all comments, suggestions, bug reports,
|
|
Michael Thomas |
79a2e45 |
# etc, to logwatch-devel@logwatch.org
|
|
Michael Thomas |
79a2e45 |
########################################################
|
|
Michael Thomas |
79a2e45 |
|
|
Michael Thomas |
79a2e45 |
use Logwatch ':dates';
|
|
Michael Thomas |
79a2e45 |
|
|
Michael Thomas |
79a2e45 |
my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
|
|
Michael Thomas |
79a2e45 |
|
|
Michael Thomas |
79a2e45 |
$SearchDate = TimeFilter('%Y-%m-%d %H:%M:%S');
|
|
Michael Thomas |
79a2e45 |
|
|
Michael Thomas |
79a2e45 |
if ( $Debug > 5 ) {
|
|
Michael Thomas |
79a2e45 |
print STDERR "DEBUG: Inside ApplyCyphesisDate...\n";
|
|
Michael Thomas |
79a2e45 |
print STDERR "DEBUG: Looking For: " . $SearchDate . "\n";
|
|
Michael Thomas |
79a2e45 |
}
|
|
Michael Thomas |
79a2e45 |
|
|
Michael Thomas |
79a2e45 |
while (defined($ThisLine = <STDIN>)) {
|
|
Michael Thomas |
79a2e45 |
if ($ThisLine =~ m/^$SearchDate /o) {
|
|
Michael Thomas |
79a2e45 |
print $ThisLine;
|
|
Michael Thomas |
79a2e45 |
}
|
|
Michael Thomas |
79a2e45 |
}
|
|
Michael Thomas |
79a2e45 |
|
|
Michael Thomas |
79a2e45 |
# vi: shiftwidth=3 syntax=perl tabstop=3 et
|