polettix/Dancer-Logger-Log4perl — pull request #4 by jwittkoski (2012-11-11 04:25:35+00:00)
Title: Refactor to use Dancer::Logger::Abstract

Refactor: inherit from `Dancer::Logger:Abstract`
Bug fix: Correctly adjust the caller level so that Log4perl's placeholders which reference the original caller are accurate. Previously, the caller always appeared to be `Dancer::Logger::Log4perl::_log`

This refactor has the following behavioral changes:
* Dancer's logging formatting (as specified in the `logger_format` config value) output populates the `%m` placeholder within Log4perl's formatting. This allows the user to decide which values to use from Dancer and/or Log4perl as needed since not all values are available in both.
* Dancer's `log` level filter value is honored in addition to Log4perl's level value. This means that if you want Log4perl's config to control the filtering level you should set Dancer's `log` to `debug`.
* Dancer `core` messages will be logged at the `info` level, but they will be filtered unless Dancer's `log` setting is `core`