diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-04-12 00:14:33 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2013-06-14 01:10:04 +0200 |
commit | 2cb136cfb8ef1d4b3a2cb68c4cbc23547bfc395f (patch) | |
tree | 9dc7cc3e9e56488326899feb37f612161969159a /setup.py | |
parent | a4460de7719eb8c8bb1f3aa72b2ce233b45d9a87 (diff) | |
download | factory-boy-2cb136cfb8ef1d4b3a2cb68c4cbc23547bfc395f.tar factory-boy-2cb136cfb8ef1d4b3a2cb68c4cbc23547bfc395f.tar.gz |
Add logging calls (Closes #45).
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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() |