summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKun Huang <academicgareth@gmail.com>2013-03-17 01:59:40 +0800
committerKun Huang <academicgareth@gmail.com>2013-03-17 01:59:40 +0800
commit7e0bfb0fc1dd8e49765d3d3ba3b2ae7160a83f5a (patch)
tree8198e2c7321063218ae57d414c6f80cd8dc16634
parent50f56b83e73b884450faba3be93bb4cd6bd36ff1 (diff)
downloadswift-bench-7e0bfb0fc1dd8e49765d3d3ba3b2ae7160a83f5a.tar.gz
Change logger name to module itself instead of root
Using root logger will make public module log failed by unknow keyword. Just change the logger name to module itself could dismiss this impact. And disable logger.propagate could prevent double outputing. Change-Id: I18696d124ebac9ca970d502558972e51de759097 Fixes: bug #1105133
-rwxr-xr-xbin/swift-bench3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/swift-bench b/bin/swift-bench
index eddffb4..ba7fb2c 100755
--- a/bin/swift-bench
+++ b/bin/swift-bench
@@ -158,7 +158,8 @@ if __name__ == '__main__':
sys.exit('Termination signal received.')
signal.signal(signal.SIGTERM, sigterm)
- logger = logging.getLogger()
+ logger = logging.getLogger(__name__)
+ logger.propagate = False
logger.setLevel({
'debug': logging.DEBUG,
'info': logging.INFO,