miyagawa/Plack-Middleware-Log-Contextual — pull request #1 by karenetheridge (2012-04-05 16:57:24+00:00)
Title: Handling mismatched log levels

Okay, after a lot of fiddling this is what I decided:

*F-- it* with making the code handle this. It would require mapping log levels *twice* just to go through the psgix.logger coderef. It's easier to simply do this:

my $logger = Log::Dispatch->new(...);
enable 'LogDispatch', logger => $logger;

enable 'Log::Contextual', logger => $logger;

...which would mean that code buried in the $app that does log_critical { $message }; doesn't go through psgix.logger *at all*, therefore nothing is being broken in the PSGI standard. Of course the $app is also free to do $env->{'psgix.logger']->({level => 'fatal', message => $message}), if it wants to avoid knowledge of what type of logger is being used.

So, the patches are limited to doc updates. I've split the wording improvements out as a separate commit in case you want to reject the other one.

Sorry again for the confusion. :/