def run(self):
global i
self.logger.info("test1")
while True:
print '*************hello t1*****************'
self.logger.info("******hello t1******")
self.logger.debug("t1 debug")
self.logger.warning("t1 warning")
self.logger.error("t1 error")
i += 1
print i
if i> 10:
break
time.sleep(3)
self.logger.info("test1 over")
class t2(threading.Thread):
def __init__(self,threadName):
print "self.logger = %s" %self.logger
None
def run(self):
global i
self.logger.info("test2")
while True:
print 'hello t2'
self.logger.info("hello t2")
self.logger.debug("t2 debug")
self.logger.warning("t2 warning")
self.logger.error("t2 error")
i += 1
print i
if i > 10:
break
time.sleep(5)
self.logger.info("test2.over")
i = 0