Merge lp:~soren/nova/logrotate into lp:~hudson-openstack/nova/trunk

Proposed by Soren Hansen
Status: Merged
Approved by: Vish Ishaya
Approved revision: 701
Merged at revision: 701
Proposed branch: lp:~soren/nova/logrotate
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 20 lines (+2/-2)
1 file modified
nova/log.py (+2/-2)
To merge this branch: bzr merge lp:~soren/nova/logrotate
Reviewer Review Type Date Requested Status
Vish Ishaya (community) Approve
Todd Willey (community) Approve
Review via email: mp+50292@code.launchpad.net

Commit message

Use WatchedFileHandler instead of RotatingFileHandler.

Description of the change

Use WatchedFileHandler instead of RotatingFileHandler.

<small><humble>I somehow led myself to believe that WatchedFileHandler was called RotatingFileHandler. My test for the patch that switched us to RotatingFileHandler used logrotate to move the old log file out of the way. That's would have been a good idea if I just hadn't accidentally pointed it at the old logrotate config which still restarted the daemon.</humble></small>

To post a comment you must log in.
Revision history for this message
Todd Willey (xtoddx) :
review: Approve
Revision history for this message
Vish Ishaya (vishvananda) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/log.py'
2--- nova/log.py 2011-02-16 18:09:40 +0000
3+++ nova/log.py 2011-02-18 09:47:00 +0000
4@@ -94,7 +94,7 @@
5 log = logging.log
6 # handlers
7 StreamHandler = logging.StreamHandler
8-RotatingFileHandler = logging.handlers.RotatingFileHandler
9+WatchedFileHandler = logging.handlers.WatchedFileHandler
10 # logging.SysLogHandler is nicer than logging.logging.handler.SysLogHandler.
11 SysLogHandler = logging.handlers.SysLogHandler
12
13@@ -139,7 +139,7 @@
14 logging.root.addHandler(syslog)
15 logpath = get_log_file_path()
16 if logpath:
17- logfile = RotatingFileHandler(logpath)
18+ logfile = WatchedFileHandler(logpath)
19 logfile.setFormatter(_formatter)
20 logging.root.addHandler(logfile)
21