mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
feature #924: Fix system wide paths for logs
This commit is contained in:
parent
79facc884e
commit
6389af9335
@ -121,6 +121,9 @@ module CloudLogger
|
||||
# Add the logger instance to the Sinatra settings
|
||||
set :logger, logger
|
||||
|
||||
# The logging will be configured in Rack, not in Sinatra
|
||||
disable :logging
|
||||
|
||||
# Use the logger instance in the Rack methods
|
||||
use Rack::CommonLogger, logger
|
||||
|
||||
|
@ -20,20 +20,23 @@
|
||||
ONE_LOCATION=ENV["ONE_LOCATION"]
|
||||
|
||||
if !ONE_LOCATION
|
||||
RUBY_LIB_LOCATION = "/usr/lib/one/ruby"
|
||||
LOG_LOCATION = "/var/log/one"
|
||||
VAR_LOCATION = "/var/lib/one"
|
||||
CONFIGURATION_FILE = "/etc/one/econe.conf"
|
||||
TEMPLATE_LOCATION = "/etc/one/ec2query_templates"
|
||||
ETC_LOCATION = "/etc/one"
|
||||
RUBY_LIB_LOCATION = "/usr/lib/one/ruby"
|
||||
else
|
||||
RUBY_LIB_LOCATION = ONE_LOCATION+"/lib/ruby"
|
||||
VAR_LOCATION = ONE_LOCATION+"/var"
|
||||
CONFIGURATION_FILE = ONE_LOCATION+"/etc/econe.conf"
|
||||
TEMPLATE_LOCATION = ONE_LOCATION+"/etc/ec2query_templates"
|
||||
VAR_LOCATION = ONE_LOCATION + "/var"
|
||||
LOG_LOCATION = ONE_LOCATION + "/var"
|
||||
ETC_LOCATION = ONE_LOCATION + "/etc"
|
||||
RUBY_LIB_LOCATION = ONE_LOCATION+"/lib/ruby"
|
||||
end
|
||||
|
||||
VIEWS_LOCATION = RUBY_LIB_LOCATION + "/cloud/econe/views"
|
||||
EC2_AUTH = VAR_LOCATION + "/.one/ec2_auth"
|
||||
EC2_LOG = VAR_LOCATION + "/econe.log"
|
||||
EC2_AUTH = VAR_LOCATION + "/.one/ec2_auth"
|
||||
EC2_LOG = LOG_LOCATION + "/econe-server.log"
|
||||
CONFIGURATION_FILE = ETC_LOCATION + "/occi-server.conf"
|
||||
|
||||
TEMPLATE_LOCATION = ETC_LOCATION + "/occi_templates"
|
||||
VIEWS_LOCATION = RUBY_LIB_LOCATION + "/cloud/econe/views"
|
||||
|
||||
$: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud"
|
||||
|
@ -25,19 +25,22 @@
|
||||
ONE_LOCATION=ENV["ONE_LOCATION"]
|
||||
|
||||
if !ONE_LOCATION
|
||||
RUBY_LIB_LOCATION="/usr/lib/one/ruby"
|
||||
LOG_LOCATION = "/var/log/one"
|
||||
VAR_LOCATION = "/var/lib/one"
|
||||
TEMPLATE_LOCATION="/etc/one/occi_templates"
|
||||
CONFIGURATION_FILE = "/etc/one/occi-server.conf"
|
||||
ETC_LOCATION = "/etc/one"
|
||||
RUBY_LIB_LOCATION = "/usr/lib/one/ruby"
|
||||
else
|
||||
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
|
||||
VAR_LOCATION = ONE_LOCATION+"/var"
|
||||
TEMPLATE_LOCATION=ONE_LOCATION+"/etc/occi_templates"
|
||||
CONFIGURATION_FILE = ONE_LOCATION+"/etc/occi-server.conf"
|
||||
VAR_LOCATION = ONE_LOCATION + "/var"
|
||||
LOG_LOCATION = ONE_LOCATION + "/var"
|
||||
ETC_LOCATION = ONE_LOCATION + "/etc"
|
||||
RUBY_LIB_LOCATION = ONE_LOCATION+"/lib/ruby"
|
||||
end
|
||||
|
||||
OCCI_AUTH = VAR_LOCATION + "/.one/occi_auth"
|
||||
OCCI_LOG = VAR_LOCATION + "/occi-server.log"
|
||||
OCCI_AUTH = VAR_LOCATION + "/.one/occi_auth"
|
||||
OCCI_LOG = LOG_LOCATION + "/occi-server.log"
|
||||
CONFIGURATION_FILE = ETC_LOCATION + "/occi-server.conf"
|
||||
|
||||
TEMPLATE_LOCATION = ETC_LOCATION + "/occi_templates"
|
||||
|
||||
$: << RUBY_LIB_LOCATION
|
||||
$: << RUBY_LIB_LOCATION+"/cloud/occi"
|
||||
|
@ -19,20 +19,21 @@
|
||||
ONE_LOCATION=ENV["ONE_LOCATION"]
|
||||
|
||||
if !ONE_LOCATION
|
||||
ETC_LOCATION="/etc/one"
|
||||
LIB_LOCATION="/usr/lib/one"
|
||||
RUBY_LIB_LOCATION="/usr/lib/one/ruby"
|
||||
VAR_LOCATION="/var/lib/one"
|
||||
CONFIGURATION_FILE="/etc/one/ozones-server.conf"
|
||||
LOG_LOCATION = "/var/log/one"
|
||||
VAR_LOCATION = "/var/lib/one"
|
||||
ETC_LOCATION = "/etc/one"
|
||||
LIB_LOCATION = "/usr/lib/one"
|
||||
RUBY_LIB_LOCATION = "/usr/lib/one/ruby"
|
||||
else
|
||||
ETC_LOCATION=ONE_LOCATION+"/etc"
|
||||
LIB_LOCATION=ONE_LOCATION+"/lib"
|
||||
RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
|
||||
VAR_LOCATION=ONE_LOCATION+"/var"
|
||||
CONFIGURATION_FILE=ONE_LOCATION+"/etc/ozones-server.conf"
|
||||
VAR_LOCATION = ONE_LOCATION + "/var"
|
||||
LOG_LOCATION = ONE_LOCATION + "/var"
|
||||
ETC_LOCATION = ONE_LOCATION + "/etc"
|
||||
LIB_LOCATION = ONE_LOCATION+"/lib"
|
||||
RUBY_LIB_LOCATION = ONE_LOCATION+"/lib/ruby"
|
||||
end
|
||||
|
||||
OZONES_LOG = VAR_LOCATION + "/ozones-server.log"
|
||||
OZONES_LOG = LOG_LOCATION + "/ozones-server.log"
|
||||
CONFIGURATION_FILE = ETC_LOCATION + "/ozones-server.conf"
|
||||
|
||||
$: << LIB_LOCATION + "/sunstone/models"
|
||||
$: << RUBY_LIB_LOCATION
|
||||
|
@ -32,8 +32,9 @@ else
|
||||
end
|
||||
|
||||
SUNSTONE_AUTH = VAR_LOCATION + "/.one/sunstone_auth"
|
||||
SUNSTONE_LOG = VAR_LOCATION + "/sunstone.log"
|
||||
SUNSTONE_LOG = LOG_LOCATION + "/sunstone.log"
|
||||
CONFIGURATION_FILE = ETC_LOCATION + "/sunstone-server.conf"
|
||||
|
||||
PLUGIN_CONFIGURATION_FILE = ETC_LOCATION + "/sunstone-plugins.yaml"
|
||||
|
||||
SUNSTONE_ROOT_DIR = File.dirname(__FILE__)
|
||||
|
Loading…
x
Reference in New Issue
Block a user