On Tue, Sep 9, 2014 at 7:44 PM, Mike Schilli <m...@perlmeister.com> wrote:

>
>> I'm not quite sure I understand the ApacheLog documentation, as "$r"
> typically is the request coming into a mod_perl handler, whereas the
> docs indicate it's some kind of server object, which the Apache2 docs
> denote as "$s". Best to clarify with the Log::Dispatch::ApacheLog folks.


It expects an object with a log method (that returns a log object).  So,
this works:

log4perl.appender.Apache.apache= sub { Apache2::ServerUtil->server }

But, I need to test more.   When logging that way newlines are escaped
(replaced with '\n') and printing unicode ends up escaped as well.


>
>
>  3) Do I need to use Log::Log4perl::Appender::Synchronized with Apache?
>>   In
>>
>
> I'd write to a separate logfile instead, turning the "syswrite" option
> on, which ensures atomic writes without overlap.


I tested with both a screen appender and logging with L::D::ApacheLog.
Long as I wrote < 4K it was always atomic.  Anything larger I would get
overlap.   I assumed I was using syswrite already.   I'll test this more,
too.

Thanks!

-- 
Bill Moseley
mose...@hank.org
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to