Fix logging into multiple files

When running tests in one process, only one logger was used and each
testcase added its own file handler, which resulted in logs appearing in
multiple files. Fix this by restoring the creation of new loggers
for each testcase and only reuse the stream handler from parent process.

Change-Id: I5b8471e041dc769128fddb433d33812bfcb5ecf6
Signed-off-by: juraj.linkes <juraj.linkes@pantheon.tech>
This commit is contained in:
juraj.linkes
2018-11-09 11:58:54 +01:00
committed by Florin Coras
parent d5969e4a7b
commit dfb5f2aff3
3 changed files with 6 additions and 7 deletions

View File

@ -50,7 +50,7 @@ scapy_logger = logging.getLogger("scapy.runtime")
scapy_logger.setLevel(logging.ERROR)
def getLogger(name):
def get_logger(name):
logger = logging.getLogger(name)
logger.setLevel(logging.DEBUG)
return logger