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

--- Comment #5 from Marcel de Rooy <[email protected]> ---
(In reply to Tomás Cohen Arazi from comment #3)
> (In reply to Julian Maurice from comment #2)
> > > Default Mojo log level is trace
> > Only if the "mode" is development. It is 'info' otherwise
> > (https://docs.mojolicious.org/Mojolicious#log). Not sure where MOJO_MODE
> > should be set (in systemd unit perhaps ?)
> 
> The koha-plack script sets either 'deployment' or 'development' depending on
> the environment (if --debug was passed, or dev install detected).

I would like to keep the configuration option too since my production is using
dev_install too ;) But when there is no config entry, I add a fallback to trace
or info depending on dev_install.


> > Is it possible to redirect the logs to what is configured in log4perl.conf
> > for the API ?
> 
> $c->log should be initialized with Koha::Logger, right? Should be doable.

Probably, but I need to dive deep down into Mojolicious plugins like
Mojolicious::Plugin::Log::Any etc. to do so. That is imo quite outside the
scope of this bug. Just noting that this was not implemented in the current
REST API. I am seeing these kind of calls:

my $logger = Koha::Logger->get({ interface => 'api' });
$logger->error("Warning: Could not load REST API spec bundle: " . $_);

Please open another bug for moving the logs and use a logger plugin.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to