comparison common/logwatch/applyhttperrordate @ 0:956e484adc12

Initial public release of Puppet configs
author IBBoard <dev@ibboard.co.uk>
date Sat, 16 Aug 2014 19:47:38 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:956e484adc12
1 ##########################################################################
2 # $Id: applystddate,v 1.19 2008/03/24 23:31:27 kirk Exp $
3 ##########################################################################
4
5 ########################################################
6 ## Copyright (c) 2008 Kirk Bauer
7 ## Covered under the included MIT/X-Consortium License:
8 ## http://www.opensource.org/licenses/mit-license.php
9 ## All modifications and contributions by other persons to
10 ## this script are assumed to have been donated to the
11 ## Logwatch project and thus assume the above copyright
12 ## and licensing terms. If you want to make contributions
13 ## under your own copyright or a different license this
14 ## must be explicitly stated in the contribution an the
15 ## Logwatch project reserves the right to not accept such
16 ## contributions. If you have made significant
17 ## contributions to this script and want to claim
18 ## copyright please contact logwatch-devel@lists.sourceforge.net.
19 #########################################################
20
21 use Logwatch ':dates';
22
23 my $Debug = $ENV{'LOGWATCH_DEBUG'} || 0;
24
25 $SearchDate = TimeFilter('%a %b %d %H:%M:%S %Y');
26
27 # The date might be "Dec 09", but it needs to be "Dec 9"...
28 #$SearchDate =~ s/ 0/ /;
29
30 if ( $Debug > 5 ) {
31 print STDERR "DEBUG: Inside ApplyStdDate...\n";
32 print STDERR "DEBUG: Looking For: " . $SearchDate . "\n";
33 }
34
35 while (defined($ThisLine = <STDIN>)) {
36 if ($ThisLine =~ m/^\[$SearchDate\]/o) {
37 print $ThisLine;
38 }
39 }
40
41 # vi: shiftwidth=3 syntax=perl tabstop=3 et
42 # Local Variables:
43 # mode: perl
44 # perl-indent-level: 3
45 # indent-tabs-mode: nil
46 # End: