Normally when using dancer you call, for example
debug 'foo';
and it will log the text. But I want to be able to log stuff in an object that doesn't import the dancer syntax. I'm wondering if there's a way to get dancer to just hand me it's log object (I assume there is one) so that I can call things like debug using an object syntax, e.g.
$logger->debug( 'foo' );
use Dancer::Logger::Console;
my $logger = Dancer::Logger::Console->new;
$logger->debug("Perl Dancer Rocks!");
You can replace the Console
logger with any other logger you want such as Syslog or ConsoleAggregator
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With