[Koha-bugs] [Bug 14448] Hypnotoad and Nginx config for REST API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 24 10:33:57 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14448

--- Comment #1 from Julian Maurice <julian.maurice at biblibre.com> ---
Created attachment 40548
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40548&action=edit
Bug 14448 - Set up logging and configuration file reading for Mojolicious.

Use environmental values to control some aspects of Mojolicious:
This way we can have different settings for different servers running
Mojolicious.

%%%% Configuration file %%%%

$ENV{MOJO_CONFIG} should be set in the system service (init) starting
Mojolicious, eg:
export MOJO_CONFIG=/home/koha/kohaclone/api/v1/hypnotoad.conf

This configuration file read by the Mojolicious::Plugin::Config
http://mojolicio.us/perldoc/Mojolicious/Plugin/Config

%%%%% Logging %%%%%

>NOTE!!
>There is a "feature" in Mojo::Server disabling STDOUT and STDERR, because such errors are not-suited-for-prod~
>This modification in Mojo::Server disables this and preserves the STD* handles for forked server threads
>in Mojo::Server::daemonize(), comment out the following lines
>
># Close filehandles
>#  open STDOUT, '>/dev/null';
>#  open STDERR, '>&STDOUT';

Log to a filename configured in an environemnt variable $ENV{MOJO_LOGFILE}
using loglevel $ENV{MOJO_LOGLEVEL}.
Defaults to '/tmp/koha-api.log' and loglevel of 'error'
Examples:
export MOJO_LOGFILE=/home/koha/koha-dev/var/log/kohaapi.mojo.log
export MOJO_LOGLEVEL=debug

Logging is done by Mojo::Log
http://www.mojolicio.us/perldoc/Mojo/Log

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


More information about the Koha-bugs mailing list