Created
September 13, 2019 06:14
-
-
Save marcusramberg/cf623b20880000ace36fea26e5005cad to your computer and use it in GitHub Desktop.
This file contains hidden or 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
diff --git a/lib/Mojolicious/Plugin/DefaultHelpers.pm b/lib/Mojolicious/Plugin/DefaultHelpers.pm | |
index 5226026cf..c6b983e6e 100644 | |
--- a/lib/Mojolicious/Plugin/DefaultHelpers.pm | |
+++ b/lib/Mojolicious/Plugin/DefaultHelpers.pm | |
@@ -173,7 +173,9 @@ sub _is_fresh { | |
sub _log { | |
my $c = shift; | |
return $c->stash->{'mojo.log'} | |
- ||= $c->app->log->context('[' . $c->req->request_id . ']'); | |
+ ||= $c->app->log->can('context') | |
+ ? $c->app->log->context('[' . $c->req->request_id . ']') | |
+ : $c->app->log; | |
} | |
sub _proxy_method_p { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment