Elukey has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/362354 )

Change subject: Revert "Remove logrotate and syslog configuration"
......................................................................


Revert "Remove logrotate and syslog configuration"

Merged in master branch, the correct one is the debian one.

This reverts commit 7fcf79c733812801229d55939afdc13d6d53b2af.

Change-Id: Ie65d8726e2ac45e2d989f2d5a3b95d3cd526e8cd
---
A debian/75-kafkatee.conf
M debian/kafkatee.install
A debian/kafkatee.logrotate
M debian/kafkatee.postinst
4 files changed, 29 insertions(+), 0 deletions(-)

Approvals:
  Elukey: Verified; Looks good to me, approved



diff --git a/debian/75-kafkatee.conf b/debian/75-kafkatee.conf
new file mode 100644
index 0000000..d9c29ce
--- /dev/null
+++ b/debian/75-kafkatee.conf
@@ -0,0 +1,2 @@
+# rsyslogd kafkatee config.
+if $programname == 'kafkatee' then /var/log/kafkatee.log
diff --git a/debian/kafkatee.install b/debian/kafkatee.install
index eb3166b..ef17cfb 100644
--- a/debian/kafkatee.install
+++ b/debian/kafkatee.install
@@ -1,3 +1,4 @@
 kafkatee                            usr/bin
 debian/etc/kafkatee.conf            etc
 debian/etc/kafkatee.d/README        etc/kafkatee.d
+debian/75-kafkatee.conf             etc/rsyslog.d
diff --git a/debian/kafkatee.logrotate b/debian/kafkatee.logrotate
new file mode 100644
index 0000000..3e284d7
--- /dev/null
+++ b/debian/kafkatee.logrotate
@@ -0,0 +1,23 @@
+/var/log/kafkatee.log {
+  daily
+  rotate 7
+  create 0664 syslog adm
+  missingok
+  compress
+  delaycompress
+  postrotate
+    service rsyslog reload
+  endscript
+}
+
+/var/cache/kafkatee/kafkatee.stats.json {
+  weekly
+  rotate 4
+  create 0644 kafkatee root
+  missingok
+  compress
+  delaycompress
+  postrotate
+    service kafkatee reload
+  endscript
+}
diff --git a/debian/kafkatee.postinst b/debian/kafkatee.postinst
index 1b3033d..4900121 100755
--- a/debian/kafkatee.postinst
+++ b/debian/kafkatee.postinst
@@ -24,6 +24,9 @@
         chown -R kafkatee:kafkatee /var/cache/kafkatee
         chown -R kafkatee:kafkatee /var/run/kafkatee
 
+        # force rsyslog to create /var/log/kafkatee.log on install.
+        service rsyslog restart
+
         echo \
 "NOTE: Default kafkatee config files have been installed at:
         /etc/kafkatee.conf

-- 
To view, visit https://gerrit.wikimedia.org/r/362354
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie65d8726e2ac45e2d989f2d5a3b95d3cd526e8cd
Gerrit-PatchSet: 1
Gerrit-Project: analytics/kafkatee
Gerrit-Branch: master
Gerrit-Owner: Elukey <ltosc...@wikimedia.org>
Gerrit-Reviewer: Elukey <ltosc...@wikimedia.org>
Gerrit-Reviewer: Filippo Giunchedi <fgiunch...@wikimedia.org>
Gerrit-Reviewer: Ottomata <ao...@wikimedia.org>
Gerrit-Reviewer: Volans <rcocci...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to