Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/nginx/templates/logrotate.erb

Issue 29785567: #11294 - Generate and store anonymized HTTPd logs (Closed)
Patch Set: Created May 18, 2018, 3:16 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/nginx/templates/logrotate.erb
===================================================================
--- a/modules/nginx/templates/logrotate.erb
+++ b/modules/nginx/templates/logrotate.erb
@@ -8,5 +8,11 @@
sharedscripts
postrotate
[ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`
+ test ! -e /var/log/nginx/<%= @log %>.2.gz || \
+ zcat /var/log/nginx/<%= @log %>.2.gz \
+ | /usr/local/bin/anonymize-access-log \
+ --geolite2-db /usr/share/GeoIP/GeoLite2-Country.mmdb \
+ --salt <%= scope.function_shellquote([@log_salt]) %> \
+ | gzip -9 > /var/log/archive/<%= @log %>.`date +%Y-%m-%d`.gz
endscript
}

Powered by Google App Engine
This is Rietveld