Merge lp://staging/~sinzui/ci-director/logrotate into lp://staging/ci-director

Proposed by Curtis Hovey
Status: Merged
Merged at revision: 112
Proposed branch: lp://staging/~sinzui/ci-director/logrotate
Merge into: lp://staging/ci-director
Diff against target: 114 lines (+56/-9)
2 files modified
cidirector/cidirector.py (+16/-9)
cidirector/tests/test_cidirector.py (+40/-0)
To merge this branch: bzr merge lp://staging/~sinzui/ci-director/logrotate
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+225966@code.staging.launchpad.net

Description of the change

This branch introduces log rotation to ci-cirector.

I set the max size to 1M. I added options to set the number of backups and the log path. The crontab for ci dirdctor would call
    $HOME/ci-director/bin/python $HOME/ci-director/ci-director -v --log-path $HOME/ci-director/ci-director.log gitbranch:1.20:github.com/juju/juju gitbranch:master:github.com/juju/juju

I added a test for main() to verify the default options and another test to verify logging config.

To post a comment you must log in.
Revision history for this message
Aaron Bentley (abentley) wrote :

Approved pending the changes we discussed on IRC:
<abentley> sinzui: I frequently run ci-director from the commandline. With this change, that won't produce any output. Could there be a way to get output back for this case, or did you decide it's not worth it?
<sinzui> abentley, Sorry. I was tailing the log.
<sinzui> abentley, I can restore the stream handler. We can have both
<abentley> sinzui: Thanks.
<abentley> sinzui: I tend to avoid having main accept arguments, because it's incompatible with the setuptools entry_points mechanism. But in this case, that doesn't matter.
<sinzui> abentley, yeah. I resisted the args to main()
 abentley, I could switch to argv=None....
<sinzui> or extract the args parser to another function manybe
<abentley> I think argv=None is simple and does the job.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches