|
From: Bill M. <mo...@ha...> - 2014-09-11 04:14:19
|
On Tue, Sep 9, 2014 at 7:44 PM, Mike Schilli <m...@pe...> 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
mo...@ha...
|