mirror of https://github.com/caronc/apprise
updated granularity of logging - include warning
parent
5c2ceef410
commit
643dc3f561
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue