summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongShengping <chdzsp@163.com>2019-03-12 10:37:38 +0800
committerZhongShengping <chdzsp@163.com>2019-03-12 13:25:42 +0800
commit778db279f162ec6c25f3b8f858a33c8a945d0cbd (patch)
tree099eea475d3f223adbde87368466e852af3c9740
parent05bf8a78e1bd42dbfa90927035356e93c742bf5d (diff)
Add log_file parameter
Notes
Notes (review): Code-Review+2: Tobias Urdin <tobias.urdin@binero.se> Code-Review+2: Alex Schultz <aschultz@redhat.com> Workflow+1: Alex Schultz <aschultz@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 12 Mar 2019 20:08:15 +0000 Reviewed-on: https://review.openstack.org/642622 Project: openstack/puppet-heat Branch: refs/heads/master
-rw-r--r--manifests/logging.pp6
-rw-r--r--releasenotes/notes/add-log_file-for-logging-951d66e9adda6235.yaml4
-rw-r--r--spec/classes/heat_logging_spec.rb3
3 files changed, 13 insertions, 0 deletions
diff --git a/manifests/logging.pp b/manifests/logging.pp
index 7a46f62..49c915a 100644
--- a/manifests/logging.pp
+++ b/manifests/logging.pp
@@ -33,6 +33,10 @@
33# If set to $::os_service_default, it will not log to any directory. 33# If set to $::os_service_default, it will not log to any directory.
34# Defaults to '/var/log/heat' 34# Defaults to '/var/log/heat'
35# 35#
36# [*log_file*]
37# (Optional) File where logs should be stored.
38# Defaults to $::os_service_default
39#
36# [*logging_context_format_string*] 40# [*logging_context_format_string*]
37# (Optional) Format string to use for log messages with context. 41# (Optional) Format string to use for log messages with context.
38# Defaults to $::os_service_default 42# Defaults to $::os_service_default
@@ -100,6 +104,7 @@ class heat::logging(
100 $use_stderr = $::os_service_default, 104 $use_stderr = $::os_service_default,
101 $log_facility = $::os_service_default, 105 $log_facility = $::os_service_default,
102 $log_dir = '/var/log/heat', 106 $log_dir = '/var/log/heat',
107 $log_file = $::os_service_default,
103 $debug = $::os_service_default, 108 $debug = $::os_service_default,
104 $logging_context_format_string = $::os_service_default, 109 $logging_context_format_string = $::os_service_default,
105 $logging_default_format_string = $::os_service_default, 110 $logging_default_format_string = $::os_service_default,
@@ -121,6 +126,7 @@ class heat::logging(
121 log_config_append => $log_config_append, 126 log_config_append => $log_config_append,
122 log_date_format => $log_date_format, 127 log_date_format => $log_date_format,
123 log_dir => $log_dir, 128 log_dir => $log_dir,
129 log_file => $log_file,
124 use_syslog => $use_syslog, 130 use_syslog => $use_syslog,
125 use_json => $use_json, 131 use_json => $use_json,
126 use_journal => $use_journal, 132 use_journal => $use_journal,
diff --git a/releasenotes/notes/add-log_file-for-logging-951d66e9adda6235.yaml b/releasenotes/notes/add-log_file-for-logging-951d66e9adda6235.yaml
new file mode 100644
index 0000000..e40d4c8
--- /dev/null
+++ b/releasenotes/notes/add-log_file-for-logging-951d66e9adda6235.yaml
@@ -0,0 +1,4 @@
1---
2features:
3 - |
4 Add the log_file option for logging.
diff --git a/spec/classes/heat_logging_spec.rb b/spec/classes/heat_logging_spec.rb
index 104ebf9..24a7c61 100644
--- a/spec/classes/heat_logging_spec.rb
+++ b/spec/classes/heat_logging_spec.rb
@@ -29,6 +29,7 @@ describe 'heat::logging' do
29 :use_stderr => false, 29 :use_stderr => false,
30 :log_facility => 'LOG_FOO', 30 :log_facility => 'LOG_FOO',
31 :log_dir => '/var/log', 31 :log_dir => '/var/log',
32 :log_file => '/var/log/heat/heat.log',
32 :debug => true, 33 :debug => true,
33 } 34 }
34 end 35 end
@@ -63,6 +64,7 @@ describe 'heat::logging' do
63 :use_journal => '<SERVICE DEFAULT>', 64 :use_journal => '<SERVICE DEFAULT>',
64 :use_stderr => '<SERVICE DEFAULT>', 65 :use_stderr => '<SERVICE DEFAULT>',
65 :log_dir => '/var/log/heat', 66 :log_dir => '/var/log/heat',
67 :log_file => '<SERVICE DEFAULT>',
66 :debug => '<SERVICE DEFAULT>', 68 :debug => '<SERVICE DEFAULT>',
67 ) 69 )
68 end 70 end
@@ -77,6 +79,7 @@ describe 'heat::logging' do
77 :use_stderr => false, 79 :use_stderr => false,
78 :syslog_log_facility => 'LOG_FOO', 80 :syslog_log_facility => 'LOG_FOO',
79 :log_dir => '/var/log', 81 :log_dir => '/var/log',
82 :log_file => '/var/log/heat/heat.log',
80 :debug => true, 83 :debug => true,
81 ) 84 )
82 end 85 end