Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Only keep one hour of old CDN logs #8313

Merged
merged 1 commit into from Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/govuk_cdnlogs/spec/classes/govuk_cdnlogs_spec.rb
Expand Up @@ -103,7 +103,7 @@
it 'should rotate the giraffe logs hourly' do
is_expected.to contain_file('/etc/logrotate.cdn_logs_hourly.conf')
.with_content(%r{^/tmp/logs/cdn-giraffe\.log$})
.with_content(/rotate 3/)
.with_content(/rotate 1/)
end

it 'should rotate the elephant logs hourly' do
Expand Down
Expand Up @@ -8,7 +8,7 @@ to_rotate_hourly.map { |name| "#{ @log_dir }/cdn-#{ name }.log" }.join("\n")

{
su root deploy
rotate 3
rotate 1
dateext
dateformat -%Y%m%d-%s
compress
Expand Down