Re: Apache Error Log

2002-06-12 Thread Randy Kobes

On Wed, 12 Jun 2002, Jaberwocky wrote:

 No, all I really want to do is print to STDERR

As Stas mentioned, it'd be helpful to see a short snippet to
illustrate your problem ... But the fact that you don't see the
messages in the logs until a server shutdown/restart suggests
some buffering going on ... Does the same problem occur if you
use $r-log-warn(This is a message)?

best regards,
randy kobes




Re: Apache Error Log

2002-06-12 Thread Doug MacEachern

On Wed, 12 Jun 2002, Jaberwocky wrote:
 
 No, all I really want to do is print to STDERR

you can use warn() instead which writes to stderr and always autoflushes.

or turn on autoflush of STDERR yourself, from perlfunc.pod:
$oldfh = select(STDERR); $| = 1; select($oldfh);

or update modperl-2.0 from cvs which turns on autoflush of STDERR by 
default.





RE: Apache Error Log

2002-06-12 Thread Jim Morrison [Mailinglists]

Sorry.. Haven't read / Can't find the whole thread..  But...

Surely just:

print STDERR Hello World;


... I always just stick this in my code...

### DEBUGGER
sub debug{
  my $message = shift;
  if ($debug){
print STDERR $message\n;
  }
}

So my code is full of:

debug(Here is something going on);


Which works a treat...  Then just tail -f the error log and watch it
all happening (breaking!)

($debug is a global var, used to simply switch the error loggin on and
off..)

Is this what you're after?

Kindest,

J

-Original Message-
From: Doug MacEachern [mailto:[EMAIL PROTECTED]] 
Sent: 12 June 2002 22:12
To: Jaberwocky
Cc: Stas Bekman; [EMAIL PROTECTED]
Subject: Re: Apache Error Log


On Wed, 12 Jun 2002, Jaberwocky wrote:
 
 No, all I really want to do is print to STDERR

you can use warn() instead which writes to stderr and always
autoflushes.

or turn on autoflush of STDERR yourself, from perlfunc.pod:
$oldfh = select(STDERR); $| = 1; select($oldfh);

or update modperl-2.0 from cvs which turns on autoflush of STDERR by 
default.




Apache Error Log

2002-06-11 Thread steve



Hey people..

Wondering if someone could help me with 
this...

I recently started using modperl2/apache2. 
Everything seems to work ok except for Apache's error logging.
I don't seem to get my apache stderr untill I 
shutdown/restart the server. Thenit prints out the whole
thing in one big batch. I read somewhere that 
modperl possibly takes over the logging handler for apache
but I tried a PerlOptions -Log in the conf file and 
that doesn't seem to help.

I posted my configuration along with this.. i don't 
really know what I'm doing when it comes to modperl2
so any help is appreciated.. thanks


VirtualHost 

 ErrorLog 
/home/webroot/sites/logs/www-error.log
 Alias /cgi-bin/ 
/home/webroot/sites/www/perl/ Alias perl/ 
/perl/

 PerlModule 
Apache::Reload PerlModule 
ModPerl::Registry PerlSwitches -w 
PerlSwitches -T PerlOptions -Log 

 Location 
/perl PerlOptions 
-ParseHeaders SetHandler 
perl-script  PerlResponseHandler 
ModPerl::Registry Options 
ExecCGI allow from 
all /Location
 PerlRequire 
/home/webroot/sites/conf/perl_conf/startup.pl
/VirtualHost


Fw: Apache Error Log

2002-06-11 Thread steve




- Original Message - 
From: steve 
To: [EMAIL PROTECTED] 
Sent: Sunday, June 09, 2002 7:42 AM
Subject: Apache Error Log

Hey people..

Wondering if someone could help me with 
this...

I recently started using modperl2/apache2. 
Everything seems to work ok except for Apache's error logging.
I don't seem to get my apache stderr untill I 
shutdown/restart the server. Thenit prints out the whole
thing in one big batch. I read somewhere that 
modperl possibly takes over the logging handler for apache
but I tried a PerlOptions -Log in the conf file and 
that doesn't seem to help.

I posted my configuration along with this.. i don't 
really know what I'm doing when it comes to modperl2
so any help is appreciated.. thanks


VirtualHost 

 ErrorLog 
/home/webroot/sites/logs/www-error.log
 Alias /cgi-bin/ 
/home/webroot/sites/www/perl/ Alias perl/ 
/perl/

 PerlModule 
Apache::Reload PerlModule 
ModPerl::Registry PerlSwitches -w 
PerlSwitches -T PerlOptions -Log 

 Location 
/perl PerlOptions 
-ParseHeaders SetHandler 
perl-script  PerlResponseHandler 
ModPerl::Registry Options 
ExecCGI allow from 
all /Location
 PerlRequire 
/home/webroot/sites/conf/perl_conf/startup.pl
/VirtualHost


Apache Error Log

2002-06-11 Thread steve




Hey people..

Wondering if someone could help me with 
this...

I recently started using modperl2/apache2. 
Everything seems to work ok except for Apache's error logging.
I don't seem to get my apache stderr untill I 
shutdown/restart the server. Thenit prints out the whole
thing in one big batch. I read somewhere that 
modperl possibly takes over the logging handler for apache
but I tried a PerlOptions -Log in the conf file and 
that doesn't seem to help.

I posted my configuration along with this.. i don't 
really know what I'm doing when it comes to modperl2
so any help is appreciated.. thanks


VirtualHost 

 ErrorLog 
/home/webroot/sites/logs/www-error.log
 Alias /cgi-bin/ 
/home/webroot/sites/www/perl/ Alias perl/ 
/perl/

 PerlModule 
Apache::Reload PerlModule 
ModPerl::Registry PerlSwitches -w 
PerlSwitches -T PerlOptions -Log 

 Location 
/perl PerlOptions 
-ParseHeaders SetHandler 
perl-script  PerlResponseHandler 
ModPerl::Registry Options 
ExecCGI allow from 
all /Location
 PerlRequire 
/home/webroot/sites/conf/perl_conf/startup.pl
/VirtualHost


Re: Apache Error Log

2002-06-11 Thread Stas Bekman

steve wrote:
 Hey people..
  
 Wondering if someone could help me with this...

Please do not repost your question 3 times!

 I recently started using modperl2/apache2. Everything seems to work ok 
 except for Apache's error logging.
 I don't seem to get my apache stderr untill I shutdown/restart the 
 server. Then it prints out the whole
 thing in one big batch. I read somewhere that modperl possibly takes 
 over the logging handler for apache
 but I tried a PerlOptions -Log in the conf file and that doesn't seem to 
 help.

'-' turns options off, not the other way around.
http://perl.apache.org/release/docs/2.0/user/config/config.html#PerlOptions_Directive
And it's +Log by default.

 I posted my configuration along with this.. i don't really know what I'm 
 doing when it comes to modperl2
 so any help is appreciated.. thanks

Are you talking about warn() and similar calls?

You have to post a short code that we can reproduce the problem with and 
your build as explained here:
http://perl.apache.org/release/docs/2.0/user/help/help.html#Reporting_Problems

Also check:
http://perl.apache.org/release/docs/2.0/api/mod_perl-2.0/Apache/Log.html



__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com