On Thursday 26 April 2007 21:10, Tyler Bird wrote: > But I was wondering isn't there anything I can do to mod_perl that will > allow a plain warn to send it to my virtualhosts log and not my servers > log. > > without using the $r->warn() syntax
The problem is you need a $r object for that. In MP1 there was a global one.
In MP2 there is not.
Your problem can possibly be solved by using PerlOptions +GlobalRequest plus
modifying the warn function by either setting $SIG{__WARN__} or
*CORE::GLOBAL::warn=sub{...}
*CORE::GLOBAL::warn=sub {
(Apache2::RequestUtil->request || Apache2::ServerUtil->server)->warn(@_);
}
Torsten
pgppjUxEb5Dr1.pgp
Description: PGP signature
