diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-05-21 20:34:59 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-06-28 22:41:57 +0200 |
commit | 09c70a582658841bc9dfa758a20bbf6fb95383a7 (patch) | |
tree | 03cb6534af1fc73bc83158f5a2878094271c0f16 | |
parent | 7f3e24134e85964e4e0177116364995ddf724601 (diff) | |
download | bugzilla-09c70a582658841bc9dfa758a20bbf6fb95383a7.tar.gz bugzilla-09c70a582658841bc9dfa758a20bbf6fb95383a7.tar.xz |
fix logging and another bug
-rw-r--r-- | Bugzilla.pm | 2 | ||||
-rw-r--r-- | Bugzilla/Quantum.pm | 9 | ||||
-rwxr-xr-x | Makefile.PL | 1 |
3 files changed, 9 insertions, 3 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm index fc17575b8..86d109350 100644 --- a/Bugzilla.pm +++ b/Bugzilla.pm @@ -194,7 +194,7 @@ sub init_page { ##################################################################### sub template { - request_cache->{template} // Bugzilla::Template->create(); + request_cache->{template} //= Bugzilla::Template->create(); request_cache->{template}->{_is_main} = 1; if (Bugzilla->cgi->server_software eq 'Bugzilla::Quantum::CGI') { diff --git a/Bugzilla/Quantum.pm b/Bugzilla/Quantum.pm index 44b9b6e5b..df06da697 100644 --- a/Bugzilla/Quantum.pm +++ b/Bugzilla/Quantum.pm @@ -24,6 +24,8 @@ use Bugzilla::Util (); use Bugzilla::RNG (); use Cwd qw(realpath); +use MojoX::Log::Log4perl::Tiny; + has 'static' => sub { Bugzilla::Quantum::Static->new }; sub startup { @@ -35,8 +37,11 @@ sub startup { $self->secrets([Bugzilla->localconfig->{side_wide_secret}]); $self->plugin('Bugzilla::Quantum::Plugin::Glue'); - - $self->log(Log::Log4perl->get_logger(__PACKAGE__)); + $self->log( + MojoX::Log::Log4perl::Tiny->new( + logger => Log::Log4perl->get_logger(__PACKAGE__) + ) + ); my $r = $self->routes; Bugzilla::Quantum::CGI->load_all($r); diff --git a/Makefile.PL b/Makefile.PL index f173d68fe..8a3c0c6ba 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -69,6 +69,7 @@ my %requires = ( 'Module::Metadata' => '1.000033', 'Module::Runtime' => '0.014', 'Mojolicious' => '7.71', + 'MojoX::Log::Log4perl::Tiny' => '0.01', 'Moo' => '2.002004', 'MooX::StrictConstructor' => '0.008', 'Mozilla::CA' => '20160104', |