Re: Logging at startup

2004-12-20 Thread Stas Bekman
Patrick LeBoutillier wrote: Hi all, I'm using the logging API ($s->notice("...")) in some code that is loaded at startup using PerlRequire. As mentionned in the docs on the Apache server cycle, my code is executed twice. The first time the code is executed, I see the log statements appear on STDERR

Logging at startup

2004-12-20 Thread Patrick LeBoutillier
Hi all, I'm using the logging API ($s->notice("...")) in some code that is loaded at startup using PerlRequire. As mentionned in the docs on the Apache server cycle, my code is executed twice. The first time the code is executed, I see the log statements appear on STDERR when Apache is restarted

Re: logging at startup

2004-11-15 Thread Arshavir Grigorian
Perrin Harkins wrote: On Wed, 2004-11-10 at 16:09, Arshavir Grigorian wrote: How can I write my code to know whether it is in a request and only if so, output the standard error page. You should be able to use $Apache::Server::Starting and $Apache::Server::ReStarting for this. There may b

Re: logging at startup

2004-11-12 Thread Arshavir Grigorian
Tom Schindl wrote: Are you talking about mp1? This would be a possibility but with a significant performance hit. You could turn it the other wayround because you know when your server is starting: http://perl.apache.org/docs/1.0/api/Apache.html#Global_Variables Because I'm at it where do I find

Re: logging at startup

2004-11-12 Thread Arshavir Grigorian
Perrin Harkins wrote: On Wed, 2004-11-10 at 16:09, Arshavir Grigorian wrote: How can I write my code to know whether it is in a request and only if so, output the standard error page. You should be able to use $Apache::Server::Starting and $Apache::Server::ReStarting for this. There may b

Re: logging at startup

2004-11-10 Thread Perrin Harkins
On Wed, 2004-11-10 at 16:09, Arshavir Grigorian wrote: > How can I write my code to know whether it is in a request and only if > so, output the standard error page. You should be able to use $Apache::Server::Starting and $Apache::Server::ReStarting for this. There may be a better way. > On a s

Re: logging at startup

2004-11-10 Thread Tom Schindl
Are you talking about mp1? This would be a possibility but with a significant performance hit. You could turn it the other wayround because you know when your server is starting: http://perl.apache.org/docs/1.0/api/Apache.html#Global_Variables Because I'm at it where do I find these variables in

Re: logging at startup

2004-11-10 Thread Arshavir Grigorian
Perrin Harkins wrote: On Wed, 2004-11-10 at 10:11, Arshavir Grigorian wrote: The problem is that when the module is loaded there is no request object and I am not sure how I can use log_error without it. Are you in a request at the time when the error happens? If so, you can get a request

Re: logging at startup

2004-11-10 Thread Perrin Harkins
On Wed, 2004-11-10 at 10:11, Arshavir Grigorian wrote: > The problem is that when the module is loaded there is no request object > and I am not sure how I can use log_error without it. Are you in a request at the time when the error happens? If so, you can get a request object by calling Apache

logging at startup

2004-11-10 Thread Arshavir Grigorian
Hi, I have a package hash that I am trying to tie to a db table when the package is loaded. I also have an error handling routine that logs the error using Apache::Log->log_error() routine then displays a standard error page to the user. The problem is that when the module is loaded there is no