tom-pytel commented on a change in pull request #87:
URL: https://github.com/apache/skywalking-python/pull/87#discussion_r528446477
##########
File path: skywalking/loggings.py
##########
@@ -20,8 +20,19 @@
from skywalking import config
+def getLogger(name=None):
+ logger = logging.getLogger(name)
+ ch = logging.StreamHandler()
+ formatter = logging.Formatter('%(name)-32s [%(threadName)-15s]
[%(levelname)-8s] %(message)s')
+ ch.setFormatter(formatter)
+ logger.addHandler(ch)
+
+ return logger
+
+
+logger = getLogger('skywalking')
+
+
def init():
- logging.basicConfig(
- level=logging.getLevelName(config.logging_level),
- format='%(name)-32s [%(threadName)-15s] [%(levelname)-8s] %(message)s',
- )
+ logging.addLevelName(logging.getLevelName('CRITICAL') + 10, 'OFF')
Review comment:
Sure, if you want to do it yourself go for it, if not I will do it
tomorrow.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]