You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Marc Lambrichs <ml...@melange-it.nl> on 2004/11/30 04:04:06 UTC

redirecting log to screen

I've written a utility module that uses a $r->log object to log my 
request using  my own debug, info, notice etc. methods. Instead of 
writing to a log file, I want to redirect all log messages to the client 
for a specific module that uses this log utility. What's the best way to 

arrange this?
-- 
Marc Lambrichs

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: redirecting log to screen

Posted by Stas Bekman <st...@stason.org>.
[Marc, please always reply to the list]

Marc Lambrichs wrote:
> Sorry. mp1.

OK, then subclass Apache::Log (actually it is the same under both generations)

>>> I've written a utility module that uses a $r->log object to log my 
>>> request using  my own debug, info, notice etc. methods. Instead of 
>>> writing to a log file, I want to redirect all log messages to the 
>>> client for a specific module that uses this log utility. What's the 
>>> best way to
>>> arrange this?
>>
>>
>>
>> You aren't saying whether you use mp1 or mp2. for example subclass the 
>> class $r->log is blessed into and send the output elsewhere.
>>
> 


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: redirecting log to screen

Posted by Stas Bekman <st...@stason.org>.
Marc Lambrichs wrote:
> I've written a utility module that uses a $r->log object to log my 
> request using  my own debug, info, notice etc. methods. Instead of 
> writing to a log file, I want to redirect all log messages to the client 
> for a specific module that uses this log utility. What's the best way to
> arrange this?

You aren't saying whether you use mp1 or mp2. for example subclass the 
class $r->log is blessed into and send the output elsewhere.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html