[Catalyst] C::Log::Log4perl looses track

Cédric Bouvier cbouvi at free.fr
Tue Feb 20 17:02:10 GMT 2007


Hello,

I'm trying to use Catalyst::Log::Log4perl and I would like it to print
the name of the method it was called from and the line number, instead
of the default "INFO - message".

Unfortunately, it seem to always consider it was called from
Catalyst::handle_request, at line 1479. This line calls
C::L::Log4perl::_flush, which indeed call log4perl's appropriate method.

As far as I understood, C::L::L only pushes log messages to an arrayref,
and sends them to log4perl only when _flush() is invoked, and that
happens *after* the request has been handled. The messages are stored in
the arrayref together with their caller's package, and depth (how deep
in the call stack they are), but when they are finally sent to Log4perl,
most of the context is gone.

My questions:
- am I missing something obvious?
- is this a bug? or is there a good reason?
- out of sheer curiosity, why not log at once?
- are the authors on the list and willing to turn this postponed logging
  into a configurable feature (I can do it myself and provide a patch,
  if need be)

TIA

-- =

C =E9 d r i c   B o u v i e r
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070220/761a=
e2f9/attachment.pgp


More information about the Catalyst mailing list