From f83d29444118c66723fea70f5cfd7268effb1883 Mon Sep 17 00:00:00 2001 From: Dana Powers Date: Sun, 13 Mar 2016 09:25:25 -0700 Subject: [PATCH] Move logging format config to tox.ini to avoid duplicate log capture in pytest output --- test/testutil.py | 2 -- tox.ini | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test/testutil.py b/test/testutil.py index eef8a01..323780c 100644 --- a/test/testutil.py +++ b/test/testutil.py @@ -143,7 +143,5 @@ class Timer(object): self.end = time.time() self.interval = self.end - self.start -logging.basicConfig(level=logging.DEBUG, - format="%(asctime)-15s %(name)-20s %(levelname)-10s %(message)s") logging.getLogger('test.fixtures').setLevel(logging.ERROR) logging.getLogger('test.service').setLevel(logging.ERROR) diff --git a/tox.ini b/tox.ini index ce7feee..1454001 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,7 @@ envlist = py{26,27,33,34,35,py}, docs testpaths = kafka test doctest_optionflags = modules addopts = --durations=10 +log_format = %(created)f %(filename)-23s %(threadName)s %(message)s [testenv] deps =