From: Zack Cerza Date: Fri, 9 May 2014 20:18:50 +0000 (-0500) Subject: Use 'stderr' and 'stdout' as logger names X-Git-Tag: 1.1.0~1463 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=22b51be46cdde3c8ce6045ed3a22c0aef1ef6152;p=teuthology.git Use 'stderr' and 'stdout' as logger names We were using just 'err' and 'out', which isn't very intuitive. Signed-off-by: Zack Cerza --- diff --git a/teuthology/orchestra/run.py b/teuthology/orchestra/run.py index c899b158..5895ed48 100644 --- a/teuthology/orchestra/run.py +++ b/teuthology/orchestra/run.py @@ -334,7 +334,7 @@ def run( g_err = None if stderr is not PIPE: if stderr is None: - stderr = logger.getChild(name).getChild('err') + stderr = logger.getChild(name).getChild('stderr') g_err = gevent.spawn(copy_file_to, r.stderr, stderr) r.stderr = stderr else: @@ -344,7 +344,7 @@ def run( g_out = None if stdout is not PIPE: if stdout is None: - stdout = logger.getChild(name).getChild('out') + stdout = logger.getChild(name).getChild('stdout') g_out = gevent.spawn(copy_file_to, r.stdout, stdout) r.stdout = stdout else: diff --git a/teuthology/orchestra/test/test_run.py b/teuthology/orchestra/test/test_run.py index 534ebc28..75d45dcd 100644 --- a/teuthology/orchestra/test/test_run.py +++ b/teuthology/orchestra/test/test_run.py @@ -32,10 +32,10 @@ class TestRun(object): log_host = fudge.Fake('log_host') logger.expects('getChild').with_args('HOST').returns(log_host) log_err = fudge.Fake('log_err') - log_host.expects('getChild').with_args('err').returns(log_err) + log_host.expects('getChild').with_args('stderr').returns(log_err) log_err.expects('log').with_args(logging.INFO, 'bad') log_out = fudge.Fake('log_out') - log_host.expects('getChild').with_args('out').returns(log_out) + log_host.expects('getChild').with_args('stdout').returns(log_out) log_out.expects('log').with_args(logging.INFO, 'foo') log_out.expects('log').with_args(logging.INFO, 'bar') channel = fudge.Fake('channel') @@ -73,7 +73,7 @@ class TestRun(object): log_host = fudge.Fake('log_host') logger.expects('getChild').with_args('HOST').returns(log_host) log_err = fudge.Fake('log_err') - log_host.expects('getChild').with_args('err').returns(log_err) + log_host.expects('getChild').with_args('stderr').returns(log_err) log_err.expects('log').with_args(logging.INFO, 'bad') channel = fudge.Fake('channel') out.has_attr(channel=channel)