Codebase list puppet-module-gnocchi / 990298d
Add Apache WSGI logging parameters for pipe/syslog Add parameters for advanced logging configurations in Apache to support piped logging and support for syslog (via mod_syslog available in Apache >= 2.5.0) Co-Authored-By: Andy Botting <andy@andybotting.com> Change-Id: Ifa33b2e84284d8032c4e4f54acb26c30fc285cb5 Takashi Kajinami 1 year, 8 months ago
3 changed file(s) with 100 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
7373 # The log file name for the virtualhost.
7474 # Optional. Defaults to undef.
7575 #
76 # [*access_log_pipe*]
77 # Specifies a pipe where Apache sends access logs for the virtualhost.
78 # Optional. Defaults to undef.
79 #
80 # [*access_log_syslog*]
81 # Sends the virtualhost access log messages to syslog.
82 # Optional. Defaults to undef.
83 #
7684 # [*access_log_format*]
7785 # The log format for the virtualhost.
7886 # Optional. Defaults to undef.
7987 #
8088 # [*error_log_file*]
8189 # The error log file name for the virtualhost.
90 # Optional. Defaults to undef.
91 #
92 # [*error_log_pipe*]
93 # Specifies a pipe where Apache sends error logs for the virtualhost.
94 # Optional. Defaults to undef.
95 #
96 # [*error_log_syslog*]
97 # Sends the virtualhost error log messages to syslog.
8298 # Optional. Defaults to undef.
8399 #
84100 # [*custom_wsgi_process_options*]
130146 $threads = 1,
131147 $priority = 10,
132148 $access_log_file = undef,
149 $access_log_pipe = undef,
150 $access_log_syslog = undef,
133151 $access_log_format = undef,
134152 $error_log_file = undef,
153 $error_log_pipe = undef,
154 $error_log_syslog = undef,
135155 $custom_wsgi_process_options = {},
136156 $headers = undef,
137157 $request_headers = undef,
170190 wsgi_script_source => $::gnocchi::params::gnocchi_wsgi_script_source,
171191 headers => $headers,
172192 request_headers => $request_headers,
193 custom_wsgi_process_options => $custom_wsgi_process_options,
173194 access_log_file => $access_log_file,
195 access_log_pipe => $access_log_pipe,
196 access_log_syslog => $access_log_syslog,
174197 access_log_format => $access_log_format,
175198 error_log_file => $error_log_file,
176 custom_wsgi_process_options => $custom_wsgi_process_options,
199 error_log_pipe => $error_log_pipe,
200 error_log_syslog => $error_log_syslog,
177201 }
178202 }
0 ---
1 features:
2 - |
3 Added parameters for advanced configuration of httpd access and error log
4 destinations including piped logging and syslog (see `mod_syslog`). Note
5 that mod_syslog requires Apache2 >= 2.5.0.
2323 :request_headers => nil,
2424 :custom_wsgi_process_options => {},
2525 :access_log_file => nil,
26 :access_log_pipe => nil,
27 :access_log_syslog => nil,
2628 :access_log_format => nil,
29 :error_log_file => nil,
30 :error_log_pipe => nil,
31 :error_log_syslog => nil,
2732 )}
2833 end
2934
4045 :custom_wsgi_process_options => {
4146 'python_path' => '/my/python/path',
4247 },
43 :access_log_file => '/var/log/httpd/access_log',
44 :access_log_format => 'some format',
45 :error_log_file => '/var/log/httpd/error_log',
4648 :headers => ['set X-XSS-Protection "1; mode=block"'],
4749 :request_headers => ['set Content-Type "application/json"'],
4850 :vhost_custom_fragment => 'Timeout 99'
7274 :custom_wsgi_process_options => {
7375 'python_path' => '/my/python/path',
7476 },
75 :access_log_file => '/var/log/httpd/access_log',
76 :access_log_format => 'some format',
77 :error_log_file => '/var/log/httpd/error_log'
77 )}
78 end
79
80 context 'with custom access logging' do
81 let :params do
82 {
83 :access_log_format => 'foo',
84 :access_log_syslog => 'syslog:local0',
85 :error_log_syslog => 'syslog:local1',
86 }
87 end
88
89 it { should contain_openstacklib__wsgi__apache('gnocchi_wsgi').with(
90 :access_log_format => params[:access_log_format],
91 :access_log_syslog => params[:access_log_syslog],
92 :error_log_syslog => params[:error_log_syslog],
93 )}
94 end
95
96 context 'with access_log_file' do
97 let :params do
98 {
99 :access_log_file => '/path/to/file',
100 }
101 end
102
103 it { should contain_openstacklib__wsgi__apache('gnocchi_wsgi').with(
104 :access_log_file => params[:access_log_file],
105 )}
106 end
107
108 context 'with access_log_pipe' do
109 let :params do
110 {
111 :access_log_pipe => 'pipe',
112 }
113 end
114
115 it { should contain_openstacklib__wsgi__apache('gnocchi_wsgi').with(
116 :access_log_pipe => params[:access_log_pipe],
117 )}
118 end
119
120 context 'with error_log_file' do
121 let :params do
122 {
123 :error_log_file => '/path/to/file',
124 }
125 end
126
127 it { should contain_openstacklib__wsgi__apache('gnocchi_wsgi').with(
128 :error_log_file => params[:error_log_file],
129 )}
130 end
131
132 context 'with error_log_pipe' do
133 let :params do
134 {
135 :error_log_pipe => 'pipe',
136 }
137 end
138
139 it { should contain_openstacklib__wsgi__apache('gnocchi_wsgi').with(
140 :error_log_pipe => params[:error_log_pipe],
78141 )}
79142 end
80143 end