-
-
Save mpapec/5da2c60f5427da016023c3c105148f15 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub log { | |
my ($c) = @_; | |
state $LOG; | |
if (!$LOG) { | |
$LOG = Mojo::Log->new( | |
path => "/tmp/my.log", | |
level => "debug" | |
); | |
$c->app->log($LOG); | |
} | |
return $LOG; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment