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

Adam Jacob adam at stalecoffee.org
Tue Feb 20 22:35:47 GMT 2007


And the patch I forgot to attach.

Adam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Catalyst-Log-Log4perl.v2.tgz
Type: application/octet-stream
Size: 6812 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070220/84219f9e/Catalyst-Log-Log4perl.v2.obj
-------------- next part --------------
On Feb 20, 2007, at 9:02 AM, C?dric Bouvier wrote:

> 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 ? d r i c   B o u v i e r
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/ 
> catalyst at lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/



More information about the Catalyst mailing list