Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
diceware-debian
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drebs
diceware-debian
Commits
8b4cc25c
Commit
8b4cc25c
authored
8 years ago
by
ulif
Browse files
Options
Downloads
Patches
Plain Diff
Support medium verbosity level.
parent
6d15eab7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
diceware/logger.py
+3
-1
3 additions, 1 deletion
diceware/logger.py
tests/test_logger.py
+2
-0
2 additions, 0 deletions
tests/test_logger.py
with
5 additions
and
1 deletion
diceware/logger.py
+
3
−
1
View file @
8b4cc25c
...
...
@@ -58,7 +58,9 @@ def configure(verbosity=None):
if
verbosity
is
None
:
return
logger
.
setLevel
(
logging
.
CRITICAL
)
if
verbosity
>
1
:
if
verbosity
==
1
:
logger
.
setLevel
(
logging
.
INFO
)
elif
verbosity
>
1
:
logger
.
setLevel
(
logging
.
DEBUG
)
logger
.
addHandler
(
logging
.
StreamHandler
())
logger
.
debug
(
"
Verbose logging enabled
"
)
This diff is collapsed.
Click to expand it.
tests/test_logger.py
+
2
−
0
View file @
8b4cc25c
...
...
@@ -25,5 +25,7 @@ def test_configure():
assert
my_logger
.
level
==
logging
.
NOTSET
configure
(
0
)
assert
my_logger
.
level
==
logging
.
CRITICAL
configure
(
1
)
assert
my_logger
.
level
==
logging
.
INFO
configure
(
2
)
assert
my_logger
.
level
==
logging
.
DEBUG
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment