Created
September 13, 2019 06:13
-
-
Save marcusramberg/d22fae35c86191d931ee3778c5be9e84 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..db04ef688 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