Make Swift log_level changeable

The log_level in Swift is fixed to INFO. The patch make it changeable
according to the value of "openstack_logging_debug".

When "openstack_logging_debug" is "False", the log_level is set to
"INFO". It is default value. Otherwise, the log_level is set to
"DEBUG".

Closes-Bug: #1777982

Change-Id: I62f430abd8f332cc2ece56a6733776fa03b10f77
Signed-off-by: tone.zhang <tone.zhang@arm.com>
This commit is contained in:
tone.zhang 2018-06-21 12:52:39 +08:00
parent 105671009d
commit cebb77d7e2
5 changed files with 6 additions and 4 deletions

View File

@ -31,6 +31,8 @@ swift_rsyncd_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ do
swift_rsyncd_tag: "{{ swift_tag }}"
swift_rsyncd_image_full: "{{ swift_rsyncd_image }}:{{ swift_rsyncd_tag }}"
swift_log_level: "{{ 'INFO' if openstack_logging_debug == 'False' else 'DEBUG'}}"
####################
# OpenStack
####################

View File

@ -7,7 +7,7 @@ log_udp_host = {{ syslog_server }}
log_udp_port = {{ syslog_udp_port }}
log_name = {{ service_name }}
log_facility = {{ syslog_swift_facility }}
log_level = INFO
log_level = {{ swift_log_level }}
workers = {{ openstack_service_workers }}
[pipeline:main]

View File

@ -7,7 +7,7 @@ log_udp_host = {{ syslog_server }}
log_udp_port = {{ syslog_udp_port }}
log_name = {{ service_name }}
log_facility = {{ syslog_swift_facility }}
log_level = INFO
log_level = {{ swift_log_level }}
workers = {{ openstack_service_workers }}
[pipeline:main]

View File

@ -8,7 +8,7 @@ log_udp_host = {{ syslog_server }}
log_udp_port = {{ syslog_udp_port }}
log_name = {{ service_name }}
log_facility = {{ syslog_swift_facility }}
log_level = INFO
log_level = {{ swift_log_level }}
workers = {{ openstack_service_workers }}
[pipeline:main]

View File

@ -6,7 +6,7 @@ log_udp_host = {{ syslog_server }}
log_udp_port = {{ syslog_udp_port }}
log_name = {{ service_name }}
log_facility = {{ syslog_swift_facility }}
log_level = INFO
log_level = {{ swift_log_level }}
workers = {{ openstack_service_workers }}
[pipeline:main]