diff --git a/manifests/wsgi/apache_api.pp b/manifests/wsgi/apache_api.pp index c6cade275..0feaf17ed 100644 --- a/manifests/wsgi/apache_api.pp +++ b/manifests/wsgi/apache_api.pp @@ -70,6 +70,18 @@ # apache::vhost ssl parameters. # Optional. Default to apache::vhost 'ssl_*' defaults. # +# [*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. +# # [*custom_wsgi_process_options*] # (optional) gives you the oportunity to add custom process options or to # overwrite the default options for the WSGI main process. @@ -105,6 +117,9 @@ class nova::wsgi::apache_api ( $wsgi_process_display_name = undef, $threads = $::os_workers, $priority = '10', + $access_log_file = false, + $access_log_format = false, + $error_log_file = undef, $custom_wsgi_process_options = {}, ) { @@ -144,6 +159,9 @@ class nova::wsgi::apache_api ( wsgi_script_file => 'nova-api', wsgi_script_source => $::nova::params::nova_api_wsgi_script_source, custom_wsgi_process_options => $custom_wsgi_process_options, + access_log_file => $access_log_file, + access_log_format => $access_log_format, + error_log_file => $error_log_file, } } diff --git a/spec/classes/nova_wsgi_apache_api_spec.rb b/spec/classes/nova_wsgi_apache_api_spec.rb index 9e67b49e4..97f98fdd3 100644 --- a/spec/classes/nova_wsgi_apache_api_spec.rb +++ b/spec/classes/nova_wsgi_apache_api_spec.rb @@ -32,6 +32,9 @@ describe 'nova::wsgi::apache_api' do :wsgi_script_file => 'nova-api', :wsgi_script_source => platform_params[:api_wsgi_script_source], :custom_wsgi_process_options => {}, + :access_log_file => false, + :access_log_format => false, + :error_log_file => nil, )} end @@ -57,6 +60,9 @@ describe 'nova::wsgi::apache_api' do :custom_wsgi_process_options => { 'python_path' => '/my/python/path', }, + :access_log_file => '/var/log/httpd/access_log', + :access_log_format => 'some format', + :error_log_file => '/var/log/httpd/error_log' } end @@ -83,6 +89,9 @@ describe 'nova::wsgi::apache_api' do :custom_wsgi_process_options => { 'python_path' => '/my/python/path', }, + :access_log_file => '/var/log/httpd/access_log', + :access_log_format => 'some format', + :error_log_file => '/var/log/httpd/error_log' )} end