[Koha-bugs] [Bug 13799] Add base for building RESTful API
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Jun 15 15:19:50 CEST 2015
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13799
Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #40098|0 |1
is obsolete| |
--- Comment #66 from Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> ---
Created attachment 40140
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40140&action=edit
Bug 13799 - 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 watching all bug changes.
More information about the Koha-bugs
mailing list