added syslog functionality

This commit is contained in:
yolanda.robla@canonical.com 2014-02-03 14:05:03 +01:00
parent 02e70dc7b5
commit f93acb15f3
5 changed files with 18 additions and 2 deletions

View File

@ -46,3 +46,9 @@ options:
default: ""
type: string
description: Encryption key used for authentication info in database
use-syslog:
type: boolean
default: False
description: |
By default, all services will log into their corresponding log files.
Setting this to True will force all services to log to the syslog.

View File

@ -53,3 +53,11 @@ class EncryptionContext(context.OSContextGenerator):
encryption = get_encryption_key()
ctxt['encryption_key'] = encryption
return ctxt
class HeatContext(context.OSContextGenerator):
def __call__(self):
ctxt = {
'use_syslog': config('use-syslog')
}
return ctxt

View File

@ -54,7 +54,8 @@ CONFIG_FILES = OrderedDict([
context.SharedDBContext(relation_prefix='heat'),
context.OSConfigFlagContext(),
heat_context.HeatIdentityServiceContext(),
heat_context.EncryptionContext()]
heat_context.EncryptionContext(),
heat_context.HeatContext()]
}),
(HEAT_API_PASTE, {
'services': [s for s in BASE_SERVICES if 'api' in s],

View File

@ -1 +1 @@
11
12

View File

@ -42,6 +42,7 @@ sql_connection = mysql://{{ database_user }}:{{ database_password }}@{{ database
verbose = True
log_dir = /var/log/heat
use_syslog = {{ use_syslog }}
[keystone_authtoken]
auth_host = {{ service_host }}