Rotate log in mod_perl

Rotate log in mod_perl

am 28.08.2009 16:47:53 von Shibi NS

--000e0cd5f6fae41ded047234c4b0
Content-Type: text/plain; charset=ISO-8859-1

My httpd.conf has following


$ErrorLog = " |bin/rotatelogs
$config->{log_file}.%Y-%m-%d-%H_%M_%S 5M";
#$TransferLog = " |bin/rotatelogs
$config->{log_accessfile}.%Y-%m-%d-%H_%M_%S 5M";


But server start fails

$parms->add_config() has failed: ErrorLog takes one argument, The filename
of the error log at
/src/linux/lib/perl5/site_perl/5.8.8/i686-linux-64int/Apache 2/PerlSections.pm
line 215.\n

Where $config->{log_file} is automated file name based on my server name

Any idea how can I get rid of it

--Shibi Ns--

--000e0cd5f6fae41ded047234c4b0
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

My httpd.conf has following

  =A0 <Perl>
  =A0 $Er=
rorLog       =3D " |bin/rotatelogs $config->{log_file}.=
%Y-%m-%d-%H_%M_%S 5M";
  =A0 #$TransferLog  =A0 =3D " =
|bin/rotatelogs $config->{log_accessfile}.%Y-%m-%d-%H_%M_%S 5M"; >
  =A0 </Perl>

But server start fails
>=A0$parms->add_config() has failed: ErrorLog takes one argument, The fi=
lename of the error log at=A0 /src/linux/lib/perl5/site_perl/5.8.8/i686-lin=
ux-64int/Apache2/PerlSections.pm line 215.\n


Where $config->{log_file} is automated file name based on my server =
name

Any idea how can I get rid of it
=A0
--Shibi Ns--


--000e0cd5f6fae41ded047234c4b0--

Re: Rotate log in mod_perl

am 29.08.2009 02:18:23 von Adam Prime

Shibi NS wrote:
> My httpd.conf has following
>
>
> $ErrorLog = " |bin/rotatelogs
> $config->{log_file}.%Y-%m-%d-%H_%M_%S 5M";
> #$TransferLog = " |bin/rotatelogs
> $config->{log_accessfile}.%Y-%m-%d-%H_%M_%S 5M";
>

>
> But server start fails
>
> $parms->add_config() has failed: ErrorLog takes one argument, The
> filename of the error log at
> /src/linux/lib/perl5/site_perl/5.8.8/i686-linux-64int/Apache 2/PerlSections.pm
> line 215.\n
>

I'm pretty sure you just need to embed some quotes in that string.

$ErrorLog =
qq["|bin/rotatelogs $config->{log_file}.%Y-%m-%d-%H_%M_%S 5M"];

or something along those lines anyway.

Adam

Re: Rotate log in mod_perl

am 31.08.2009 08:01:06 von Shibi NS

--000e0cd5f2667a851c047269c24b
Content-Type: text/plain; charset=ISO-8859-1

I have tied this but no luck .

Shibi

On Sat, Aug 29, 2009 at 5:48 AM, Adam Prime wrote:

> Shibi NS wrote:
>
>> My httpd.conf has following
>>
>>
>> $ErrorLog = " |bin/rotatelogs
>> $config->{log_file}.%Y-%m-%d-%H_%M_%S 5M";
>> #$TransferLog = " |bin/rotatelogs
>> $config->{log_accessfile}.%Y-%m-%d-%H_%M_%S 5M";
>>

>>
>> But server start fails
>>
>> $parms->add_config() has failed: ErrorLog takes one argument, The
>> filename of the error log at
>> /src/linux/lib/perl5/site_perl/5.8.8/i686-linux-64int/Apache 2/PerlSections.pm
>> line 215.\n
>>
>>
> I'm pretty sure you just need to embed some quotes in that string.
>
> $ErrorLog =
> qq["|bin/rotatelogs $config->{log_file}.%Y-%m-%d-%H_%M_%S 5M"];
>
> or something along those lines anyway.
>
> Adam
>



--
--Shibi Ns--

--000e0cd5f2667a851c047269c24b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

I have tied this but no luck .

Shibi

e">On Sat, Aug 29, 2009 at 5:48 AM, Adam Prime < f=3D"mailto:adam.prime@utoronto.ca">adam.prime@utoronto.ca> w=
rote:

204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
>Shibi NS wrote:

204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
My httpd.conf has following



=A0 =A0<Perl>

=A0 =A0$ErrorLog =A0 =A0 =A0 =3D " |bin/rotatelogs $config->{log_f=
ile}.%Y-%m-%d-%H_%M_%S 5M";

=A0 =A0#$TransferLog =A0  = " |bin/rotatelogs $config->{log_ac=
cessfile}.%Y-%m-%d-%H_%M_%S 5M";

=A0 =A0</Perl>



But server start fails



=A0$parms->add_config() has failed: ErrorLog takes one argument, The fil=
ename of the error log at =A0/src/linux/lib/perl5/site_perl/5.8.8/i686-linu=
x-64int/Apache2/PerlSections.pm line 215.\n






I'm pretty sure you just need to embed some quotes in that string.



$ErrorLog =3D

=A0 qq["|bin/rotatelogs $config->{log_file}.%Y-%m-%d-%H_%M_%S 5M&q=
uot;];



or something along those lines anyway.



Adam




--
--Shibi Ns--


--000e0cd5f2667a851c047269c24b--