-
-
Save anonymous/831e983fce089a5d23d4 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
diff --git a/lib/Mojolicious.pm b/lib/Mojolicious.pm | |
index 4ad34e6..c944c55 100644 | |
--- a/lib/Mojolicious.pm | |
+++ b/lib/Mojolicious.pm | |
@@ -97,11 +97,12 @@ sub dispatch { | |
# Start timer (ignore static files) | |
my $stash = $c->stash; | |
- unless ($stash->{'mojo.static'} || $stash->{'mojo.started'}) { | |
+ my $log = $self->log; | |
+ if ($log->is_debug && !$stash->{'mojo.static'} && !$stash->{'mojo.started'}) { | |
my $req = $c->req; | |
my $method = $req->method; | |
my $path = $req->url->path->to_abs_string; | |
- $self->log->debug(qq{$method "$path"}); | |
+ $log->debug(qq{$method "$path"}); | |
$stash->{'mojo.started'} = [Time::HiRes::gettimeofday]; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment