updated granularity of logging - include warning

pull/81/head
Chris Caron 2019-03-10 10:51:36 -04:00
parent 5c2ceef410
commit 643dc3f561
2 changed files with 8 additions and 2 deletions

View File

@ -41,7 +41,7 @@ from . import __license__
from . import __copywrite__
# Logging
logger = logging.getLogger('apprise.plugins.NotifyBase')
logger = logging.getLogger('apprise')
# Defines our click context settings adding -h to the additional options that
# can be specified to get the help menu to come up
@ -112,9 +112,12 @@ def main(title, body, config, urls, notification_type, theme, tag, verbose,
if verbose > 2:
logger.setLevel(logging.DEBUG)
elif verbose == 1:
elif verbose > 1:
logger.setLevel(logging.INFO)
elif verbose > 0:
logger.setLevel(logging.WARNING)
else:
logger.setLevel(logging.ERROR)

View File

@ -74,6 +74,9 @@ def test_apprise_cli(tmpdir):
result = runner.invoke(cli.main, ['-vvv'])
assert result.exit_code == 1
result = runner.invoke(cli.main, ['-vvvv'])
assert result.exit_code == 1
# Display version information and exit
result = runner.invoke(cli.main, ['-V'])
assert result.exit_code == 0