On Tue, 7 Feb 2017 Andrew Beverley <andy@andybev.com> wrote:
On Thu, 5 Jan 2017 Nathan Bailey <web@polynate.net> wrote:
Hi all (especially Andy :-)
Sorry for the delay on this Nathan.
What are you supposed to put in your non-main route handlers? use Dancer2::Plugin::LogReport mode => 'DEBUG'; (like main route handler); OR use Log::Report; (like other modules)
I can now say that it /should/ be the same as any other route handlers. So wherever you have:
use Dancer2;
You should also have:
use Dancer2::Plugin::LogReport ...
Although if you're using the same appname (appname => ...) then you only need to use Log::Report.
The reason being that otherwise the required logging hook isn't inserted into that particular app.
However, there is a problem with the way the current version of the plugin works, which means that the correct DSL isn't always available to it. This will cause some unexpected behaviour. I'm working on a fix at the moment.
Fix included in aforementioned v1.19 Log::Report release. Let me know if you run into any other problems. Regards, Andy