Merge lp:~bac/charms/precise/charmworld/logrotate into lp:~juju-jitsu/charms/precise/charmworld/trunk

Proposed by Brad Crittenden
Status: Merged
Merged at revision: 86
Proposed branch: lp:~bac/charms/precise/charmworld/logrotate
Merge into: lp:~juju-jitsu/charms/precise/charmworld/trunk
Diff against target: 21 lines (+14/-0)
1 file modified
hooks/install (+14/-0)
To merge this branch: bzr merge lp:~bac/charms/precise/charmworld/logrotate
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+198825@code.launchpad.net

Description of the change

Add logrotate configuration for the charmworld log files.

The assumption is that the log_dir variable set in common is accurate, even for production. Please correct me if that is wrong.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

Thank you. staging and production do use the charm's rules for logging.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/install'
2--- hooks/install 2013-10-25 16:08:18 +0000
3+++ hooks/install 2013-12-12 19:52:47 +0000
4@@ -57,3 +57,17 @@
5 if [ "$UPGRADING" != "1" ]; then
6 maybe_rmtree $project_dir
7 fi
8+
9+# Set up logrotation.
10+cat <<EOT > /etc/logrotate.d/charmworld
11+$log_dir/*.log {
12+ weekly
13+ maxsize 500M
14+ delaycompress
15+ compress
16+ rotate 5
17+ copytruncate
18+ noifempty
19+ missingok
20+}
21+EOT

Subscribers

People subscribed via source and target branches

to all changes: