Allow setting log files for apache vhost
This allows the setting of the error and access file logs, as well as the access log format. This was done in a similar fashion as one can configure these ones in the keystone wsgi manifest. Change-Id: Ib96107448fa8dde4bae799144d529f85019b1d98
This commit is contained in:
parent
7d1420acb8
commit
0c4b3bde4e
@ -52,6 +52,18 @@
|
||||
# (optional) The number of threads for the vhost.
|
||||
# Defaults to $::os_workers
|
||||
#
|
||||
# [*access_log_file*]
|
||||
# The log file name for the virtualhost.
|
||||
# Optional. Defaults to false.
|
||||
#
|
||||
# [*access_log_format*]
|
||||
# The log format for the virtualhost.
|
||||
# Optional. Defaults to false.
|
||||
#
|
||||
# [*error_log_file*]
|
||||
# The error log file name for the virtualhost.
|
||||
# Optional. Defaults to undef.
|
||||
#
|
||||
# [*wsgi_process_display_name*]
|
||||
# (optional) Name of the WSGI process display-name.
|
||||
# Defaults to undef
|
||||
@ -93,6 +105,9 @@ class watcher::wsgi::apache (
|
||||
$wsgi_process_display_name = undef,
|
||||
$threads = $::os_workers,
|
||||
$priority = '10',
|
||||
$access_log_file = false,
|
||||
$access_log_format = false,
|
||||
$error_log_file = undef,
|
||||
) {
|
||||
|
||||
include ::watcher::deps
|
||||
@ -128,5 +143,8 @@ class watcher::wsgi::apache (
|
||||
wsgi_script_file => 'app',
|
||||
wsgi_script_source => $::watcher::params::watcher_wsgi_script_source,
|
||||
require => Anchor['watcher::install::end'],
|
||||
access_log_file => $access_log_file,
|
||||
access_log_format => $access_log_format,
|
||||
error_log_file => $error_log_file,
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,8 @@ describe 'watcher::wsgi::apache' do
|
||||
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
||||
:wsgi_script_file => 'app',
|
||||
:wsgi_script_source => platform_params[:wsgi_script_source],
|
||||
:access_log_file => false,
|
||||
:access_log_format => false,
|
||||
)}
|
||||
end
|
||||
|
||||
@ -34,6 +36,9 @@ describe 'watcher::wsgi::apache' do
|
||||
:ssl => false,
|
||||
:wsgi_process_display_name => 'watcher',
|
||||
:workers => 37,
|
||||
:access_log_file => '/var/log/httpd/access_log',
|
||||
:access_log_format => 'some format',
|
||||
:error_log_file => '/var/log/httpd/error_log'
|
||||
}
|
||||
end
|
||||
it { is_expected.to contain_class('watcher::params') }
|
||||
@ -56,6 +61,9 @@ describe 'watcher::wsgi::apache' do
|
||||
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
||||
:wsgi_script_file => 'app',
|
||||
:wsgi_script_source => platform_params[:wsgi_script_source],
|
||||
:access_log_file => '/var/log/httpd/access_log',
|
||||
:access_log_format => 'some format',
|
||||
:error_log_file => '/var/log/httpd/error_log'
|
||||
)}
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user