Thread apache error_log (4 answers)
Opened by faby71 at 2007-07-18 19:19

renee
 2007-07-19 00:48
#389 #389
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
ungetestet
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl

use strict;
use warnings;
use CGI;
use CGI::Carp qw(fatalsToBrowser);

my $cgi = CGI->new();

$cgi=new CGI();
print $cgi->header( 'text/plain' );

my $error_log = 'C:\Apache2\logs\error.log';
my $date = localtime;
$date = substr $date,0,10;
open my $fh, '<', $error_log or die $!;
while( <$fh> ){
   print if /$date/;
}
close $fh;
\n\n

<!--EDIT|renee|1184791781-->
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread apache error_log