[Koha-bugs] [Bug 13799] Add base for building RESTful API

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 12 11:43:30 CEST 2015


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

--- Comment #59 from Olli-Antti Kivilahti <olli-antti.kivilahti at jns.fi> ---
Created attachment 40098
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40098&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 %%%%%

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