From 4a29d896ea90e8174ca10a8fd696e4c0767d3350 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 21 Jun 2018 17:17:21 -0400 Subject: add request id to logs --- Bugzilla/Quantum/Plugin/Glue.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/Quantum/Plugin/Glue.pm b/Bugzilla/Quantum/Plugin/Glue.pm index 112514b63..301003740 100644 --- a/Bugzilla/Quantum/Plugin/Glue.pm +++ b/Bugzilla/Quantum/Plugin/Glue.pm @@ -53,16 +53,17 @@ sub register { } ); - if ($D{HTTPD_IN_SUBDIR}) { - $app->hook( - before_dispatch => sub { + $app->hook( + before_dispatch => sub { + if ($D{HTTPD_IN_SUBDIR}) { my ($c) = @_; my $path = $c->req->url->path; $path =~ s{^/bmo}{}s; $c->req->url->path($path); } - ); - } + Log::Log4perl::MDC->put(request_id => $c->req->request_id); + } + ); Bugzilla::Extension->load_all(); if ($app->mode ne 'development') { -- cgit v1.2.3-24-g4f1b