From 45dda5e3565d1a4c7dc030bcf674b681996b9cb2 Mon Sep 17 00:00:00 2001 From: Kun Huang Date: Sun, 17 Mar 2013 01:59:40 +0800 Subject: [PATCH] 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 --- bin/swift-bench | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/swift-bench b/bin/swift-bench index eddffb4afa..ba7fb2c923 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,