summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2013-04-12 00:14:33 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2013-06-14 01:10:04 +0200
commit2cb136cfb8ef1d4b3a2cb68c4cbc23547bfc395f (patch)
tree9dc7cc3e9e56488326899feb37f612161969159a /setup.py
parenta4460de7719eb8c8bb1f3aa72b2ce233b45d9a87 (diff)
downloadfactory-boy-2cb136cfb8ef1d4b3a2cb68c4cbc23547bfc395f.tar
factory-boy-2cb136cfb8ef1d4b3a2cb68c4cbc23547bfc395f.tar.gz
Add logging calls (Closes #45).
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 050e43b..42519ce 100755
--- a/setup.py
+++ b/setup.py
@@ -46,10 +46,15 @@ class test(cmd.Command):
except ImportError:
import unittest
- if self.verbose:
- verbosity=1
+ import logging
+ logger = logging.getLogger('factory')
+ logger.addHandler(logging.StreamHandler())
+
+ verbosity = self.verbose
+ if verbosity >= 2:
+ logger.setLevel(logging.DEBUG)
else:
- verbosity=0
+ logger.setLevel(logging.INFO)
loader = unittest.TestLoader()
suite = unittest.TestSuite()