From 63709c22f0b85730eb981f6a6f3d0f4fda1cc421 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Robles Date: Mon, 9 Oct 2017 04:31:30 +0000 Subject: [PATCH] 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 --- manifests/api/logging.pp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manifests/api/logging.pp b/manifests/api/logging.pp index 2d2171d4..7646a1ae 100644 --- a/manifests/api/logging.pp +++ b/manifests/api/logging.pp @@ -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':