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