On Tue, Jul 03, 2007 at 11:23:43PM -0700, Bill Moseley wrote: > On Tue, Jul 03, 2007 at 03:14:52PM -0700, Quinn Weaver wrote: > > > Now, the problem with that is $c->log->warn uses caller() so errors > > > are reported from that sub, not from where warn was called. So, need > > > a way to use (IIRC) caller(1) instead in that case. > > > > Talked to Bill off-list, and this problem appears to be spurious. > > That is, the messages are actually reported as coming from the right line, > > after all. > > No, that's something different. Full stack traces look fine. > > It's %M and the other formats mentioned in the docs that won't be > right. The plugin uses caller, so obviously calling $c->log->warn > will look different than calling warn (when is trapped and then calls > $c->log->warn as in the code I posted). > > Print out %M and call both $c->log->warn and warn() and you will see the > issue.
Aha, got it. I think the solution is to manipulate $Log::Log4perl::caller_depth somewhere within Catalyst::Log::Log4perl. I'm working on a hacked version of C::L::L anyway, so I will investigate. I'll try this out tomorrow, or today after the barbecue. :) -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ 510-520-5217 _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
