Accept empty strings for log_file

An empty string is an acceptable value of this entry, and it forces
logging to stdout/stderr, which is useful when running on containers.

In other modules (such as puppet-keystone) log_file defaults to
$::os_service_default. This is not the case in this module, so we
need to allow an empty value in log_file here as well.

Change-Id: I3fa4a38d21f0f7e447157ab7814a547c10a4b7d3
This commit is contained in:
Juan Antonio Osorio Robles 2017-10-09 04:31:30 +00:00
parent 30c3db36c2
commit 63709c22f0
1 changed files with 5 additions and 1 deletions

View File

@ -122,7 +122,11 @@ class glance::api::logging(
} else {
$log_dir_real = $log_dir
$log_file_real = pick($::glance::api::log_file,$log_file)
if $log_file != '' {
$log_file_real = pick($::glance::api::log_file,$log_file)
} else {
$log_file_real = $log_file
$debug_real = pick($::glance::api::debug,$debug)
oslo::log { 'glance_api_config':