You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Hermida, Leandro" <Le...@fmi.ch> on 2006/11/16 22:01:57 UTC

Error messages go to server ErrorLog not to VirtualHost ErrorLog

Hello,

I have a problem related to this with CGI scripts which I am porting to
mod_perl 2 and presently running under ModPerl::Registry.  I have a
VirtualHost were I have enabled mod_perl and ModPerl::Registry as the
handler.  I have set the ErrorLog directive in this VirtualHost to a
different file than the global server ErrorLog.  For debugging and
testing of my code I typically do a

print STDERR "Here is a message";

inside of a script.  The problem is that it always goes to the global
server ErrorLog not to the VirtualHost ErrorLog.  It didn't do this in
mod_perl 1.  Am I doing something wrong?

Thank you,

Leandro Hermida


-----Original Message-----
From: Hans de Groot [mailto:hansg@dandy.nl] 
Sent: Tuesday, November 14, 2006 20:48
To: modperl@perl.apache.org
Subject: I can change the error_log for a virtual host but how to change
the access_log?

Hi,

I can use 
	$old_error_fname = $s->error_fname($result{error_log});
To set the location of the error log of a particular virtual host.

But I can't find a way to set the location of the normal access_log
file.
this seems weird to me.

Does anyone no how to change that?

Thanks

Hans de Groot


---
Hans de Groot 
Email: hansg@dandy.nl   www: http://www.dandy.nl


Re: Error messages go to server ErrorLog not to VirtualHost ErrorLog

Posted by Fred Moyer <fr...@redhotpenguin.com>.
Hermida, Leandro wrote:
> Hello,
> 
> I have a problem related to this with CGI scripts which I am porting to
> mod_perl 2 and presently running under ModPerl::Registry.  I have a
> VirtualHost were I have enabled mod_perl and ModPerl::Registry as the
> handler.  I have set the ErrorLog directive in this VirtualHost to a
> different file than the global server ErrorLog.  For debugging and
> testing of my code I typically do a
> 
> print STDERR "Here is a message";
> 
> inside of a script.  The problem is that it always goes to the global
> server ErrorLog not to the VirtualHost ErrorLog.  It didn't do this in
> mod_perl 1.  Am I doing something wrong?

Can you post the relevant snippet from your httpd.conf?