diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index fc6c80c..5f02793 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.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. +# # == Dependencies # # requires Class['apache'] & Class['mistral'] @@ -97,6 +109,9 @@ class mistral::wsgi::apache ( $wsgi_process_display_name = undef, $threads = 1, $priority = '10', + $access_log_file = false, + $access_log_format = false, + $error_log_file = undef, ) { include ::mistral::deps @@ -151,5 +166,8 @@ class mistral::wsgi::apache ( wsgi_script_dir => $::mistral::params::mistral_wsgi_script_path, wsgi_script_file => 'app', wsgi_script_source => $::mistral::params::mistral_wsgi_script_source, + access_log_file => $access_log_file, + access_log_format => $access_log_format, + error_log_file => $error_log_file, } } diff --git a/spec/classes/mistral_wsgi_apache_spec.rb b/spec/classes/mistral_wsgi_apache_spec.rb index 03e0fba..b4f63b5 100644 --- a/spec/classes/mistral_wsgi_apache_spec.rb +++ b/spec/classes/mistral_wsgi_apache_spec.rb @@ -23,6 +23,8 @@ describe 'mistral::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 @@ -35,6 +37,9 @@ describe 'mistral::wsgi::apache' do :ssl => false, :wsgi_process_display_name => 'mistral', :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('mistral::deps') } @@ -58,6 +63,9 @@ describe 'mistral::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