diff --git a/manifests/storage/server.pp b/manifests/storage/server.pp index 0ec09dee..51054646 100644 --- a/manifests/storage/server.pp +++ b/manifests/storage/server.pp @@ -18,6 +18,8 @@ define swift::storage::server( $updater_concurrency = $::processorcount, $reaper_concurrency = $::processorcount, $log_facility = "LOG_LOCAL2", + $log_level = "INFO", + $log_address = "/dev/log", # this parameters needs to be specified after type and name $config_file_path = "${type}-server/${name}.conf" ) { diff --git a/spec/defines/swift_storage_server_spec.rb b/spec/defines/swift_storage_server_spec.rb index b3d795b4..6fc3c4dc 100644 --- a/spec/defines/swift_storage_server_spec.rb +++ b/spec/defines/swift_storage_server_spec.rb @@ -145,7 +145,13 @@ describe 'swift::storage::server' do .with_content(/^user\s*=\s*swift\s*$/) } it { should contain_file(fragment_file) \ - .with_content(/^log_facility\s*=\s*LOG_LOCAL2\s*$/) + .with_content(/^set log_facility\s*=\s*LOG_LOCAL2\s*$/) + } + it { should contain_file(fragment_file) \ + .with_content(/^set log_level\s*=\s*INFO\s*$/) + } + it { should contain_file(fragment_file) \ + .with_content(/^set log_address\s*=\s*\/dev\/log\s*$/) } it { should contain_file(fragment_file) \ .with_content(/^workers\s*=\s*1\s*$/) diff --git a/templates/account-server.conf.erb b/templates/account-server.conf.erb index ceec4d55..a70ad1a7 100644 --- a/templates/account-server.conf.erb +++ b/templates/account-server.conf.erb @@ -12,6 +12,12 @@ pipeline = <%= @pipeline.to_a.join(' ') %> [app:account-server] use = egg:swift#account +set log_name = account-server +set log_facility = <%= log_facility %> +set log_level = <%= log_level %> +set log_requests = True +set log_address = <%= log_address %> + [account-replicator] concurrency = <%= @replicator_concurrency %> diff --git a/templates/container-server.conf.erb b/templates/container-server.conf.erb index 63d70b04..4ad7d3f8 100644 --- a/templates/container-server.conf.erb +++ b/templates/container-server.conf.erb @@ -13,6 +13,11 @@ pipeline = <%= @pipeline.to_a.join(' ') %> [app:container-server] use = egg:swift#container +set log_name = container-server +set log_facility = <%= log_facility %> +set log_level = <%= log_level %> +set log_requests = True +set log_address = <%= log_address %> [container-replicator] concurrency = <%= @replicator_concurrency %> diff --git a/templates/object-server.conf.erb b/templates/object-server.conf.erb index 3fc3088b..79c8c0ca 100644 --- a/templates/object-server.conf.erb +++ b/templates/object-server.conf.erb @@ -12,6 +12,11 @@ pipeline = <%= @pipeline.to_a.join(' ') %> [app:object-server] use = egg:swift#object +set log_name = object-server +set log_facility = <%= log_facility %> +set log_level = <%= log_level %> +set log_requests = True +set log_address = <%= log_address %> [object-replicator] concurrency = <%= @replicator_concurrency %>