diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-06-21 23:17:21 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-06-28 22:42:01 +0200 |
commit | 4a29d896ea90e8174ca10a8fd696e4c0767d3350 (patch) | |
tree | 1a8676fc913dd09d93f21f89d5cee5e9d5519946 /Bugzilla | |
parent | d56c99a3286afb63266d5019069d15ab4b647106 (diff) | |
download | bugzilla-4a29d896ea90e8174ca10a8fd696e4c0767d3350.tar.gz bugzilla-4a29d896ea90e8174ca10a8fd696e4c0767d3350.tar.xz |
add request id to logs
Diffstat (limited to 'Bugzilla')
-rw-r--r-- | Bugzilla/Quantum/Plugin/Glue.pm | 11 |
1 files changed, 6 insertions, 5 deletions
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') { |