[dancer-users] transfer log object

Andrew Beverley andy at andybev.com
Sun Aug 23 17:39:32 BST 2015

On Sun, 2015-08-23 at 12:17 -0400, Arjan Widlak wrote:
> How can I get the log object? (outside of a specific route)
> I have this Dancer2 application that is an interface to a backend.
> If I could handover the Dancer2 log object to the backend, it could 
> write to the same log.

Sorry, I don't know the answer to your direct question, but you might want to
consider using Dancer2::Plugin::LogReport and Dancer2::Logger::LogReport

That way everything in your application will write to the same logger, which can
also be written to in any other application/backend, just by using Log::Report.

Log::Report also has the advantage of having many logging backends, which can be
configured/filtered as required for your application deployment.

There's still a bit of development work to do on the plugin; once that's complete
I'll be posting some more details here.


More information about the dancer-users mailing list