On Sun, 2015-08-23 at 13:09 -0400, Arjan Widlak wrote:
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.
Thanx for your reply. I've just read the documentation and I can see the use of the plugin. However I would have the same question: how can I access the log object and pass a reference to another object? (outside of a route)
You don't need to access the log object. In your other object you just do (for example): use Log::Report; trace "This will be logged as a debug string"; warning "This will be logged as a warning"; The above lines will be logged in exactly the same way as any other logging in your Dancer2 application, as long as you're using the Dancer2::Logger::LogReport logging backend. Andy