Merge lp:~ewanmellor/glance/lp801703 into lp:~hudson-openstack/glance/trunk

Proposed by Ewan Mellor
Status: Merged
Approved by: Brian Waldon
Approved revision: 142
Merged at revision: 142
Proposed branch: lp:~ewanmellor/glance/lp801703
Merge into: lp:~hudson-openstack/glance/trunk
Diff against target: 25 lines (+8/-0)
1 file modified
run_tests.py (+8/-0)
To merge this branch: bzr merge lp:~ewanmellor/glance/lp801703
Reviewer Review Type Date Requested Status
Brian Waldon (community) Approve
Jay Pipes (community) Approve
Review via email: mp+65822@code.launchpad.net

Commit message

Bug #801703: No logging is configured for unit tests

Configure logging to go to stderr during the unit test run. This gets
captured by run_tests.sh into run_tests.err.log.

Description of the change

Bug #801703: No logging is configured for unit tests

Configure logging to go to stderr during the unit test run. This gets
captured by run_tests.sh into run_tests.err.log.

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

lgtm. nice.

review: Approve
Revision history for this message
Brian Waldon (bcwaldon) wrote :

This will be very useful.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'run_tests.py'
2--- run_tests.py 2011-03-16 19:27:26 +0000
3+++ run_tests.py 2011-06-24 18:48:33 +0000
4@@ -51,6 +51,7 @@
5 """
6
7 import gettext
8+import logging
9 import os
10 import unittest
11 import sys
12@@ -269,6 +270,13 @@
13
14
15 if __name__ == '__main__':
16+ logger = logging.getLogger()
17+ hdlr = logging.StreamHandler()
18+ formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
19+ hdlr.setFormatter(formatter)
20+ logger.addHandler(hdlr)
21+ logger.setLevel(logging.DEBUG)
22+
23 c = config.Config(stream=sys.stdout,
24 env=os.environ,
25 verbosity=3)

Subscribers

People subscribed via source and target branches