[Koha-bugs] [Bug 30242] New: Allow changing Mojolicious log level

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 7 13:55:17 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30242

            Bug ID: 30242
           Summary: Allow changing Mojolicious log level
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: m.de.rooy at rijksmuseum.nl
        QA Contact: testopia at bugs.koha-community.org

Default Mojo log level is trace. I am seeing various debug API warnings in the
plack-error.log where they do not even belong.

We should add something like this in Koha::REST::V1->startup:
    my $level = C4::Context->config('mojo_log_level') || 'warn';
    $self->log->level($level);

And add the mojo_log_level to koha-conf.xml. Something like:
<mojo_log_level>warn</mojo_log_level>

Note that we should not have such debug warnings in production logs. The above
lines do not yet move the Mojo warns to an api log btw.

What do you think?

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list