From 22b51be46cdde3c8ce6045ed3a22c0aef1ef6152 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 9 May 2014 15:18:50 -0500 Subject: [PATCH] Use 'stderr' and 'stdout' as logger names We were using just 'err' and 'out', which isn't very intuitive. Signed-off-by: Zack Cerza --- teuthology/orchestra/run.py | 4 ++-- teuthology/orchestra/test/test_run.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/teuthology/orchestra/run.py b/teuthology/orchestra/run.py index c899b1585a..5895ed48c2 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 534ebc280a..75d45dcdb3 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) -- 2.39.5