Changes default log level to debug (2)

Helps with troubleshooting and error reporting.
Also closes #824
This commit is contained in:
Andre Miras 2019-03-12 20:04:13 +01:00
parent 4c2152b36e
commit 5cde0b0f92
3 changed files with 7 additions and 7 deletions

View file

@ -112,7 +112,7 @@ class Buildozer(object):
def __init__(self, filename='buildozer.spec', target=None): def __init__(self, filename='buildozer.spec', target=None):
super(Buildozer, self).__init__() super(Buildozer, self).__init__()
self.log_level = 1 self.log_level = 2
self.environ = {} self.environ = {}
self.specfilename = filename self.specfilename = filename
self.state = None self.state = None
@ -139,7 +139,7 @@ class Buildozer(object):
try: try:
self.log_level = int(self.config.getdefault( self.log_level = int(self.config.getdefault(
'buildozer', 'log_level', '1')) 'buildozer', 'log_level', '2'))
except Exception: except Exception:
pass pass

View file

@ -248,7 +248,7 @@ ios.ios_deploy_branch = 1.7.0
[buildozer] [buildozer]
# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output)) # (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 1 log_level = 2
# (int) Display warning if buildozer is run as root (0 = False, 1 = True) # (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 1 warn_on_root = 1

View file

@ -86,11 +86,11 @@ class TestBuildozer(unittest.TestCase):
""" """
# the default log level value is known # the default log level value is known
buildozer = Buildozer('does_not_exist.spec') buildozer = Buildozer('does_not_exist.spec')
assert buildozer.log_level == 1
# sets log level to 2 on the spec file
self.set_specfile_log_level(self.specfile.name, 2)
buildozer = Buildozer(self.specfile.name)
assert buildozer.log_level == 2 assert buildozer.log_level == 2
# sets log level to 1 on the spec file
self.set_specfile_log_level(self.specfile.name, 1)
buildozer = Buildozer(self.specfile.name)
assert buildozer.log_level == 1
def test_log_print(self): def test_log_print(self):
""" """