Skip to content

Commit bedcb93

Browse files
committed
Add a verbose flag
The `--verbose` flag turns on verbose logging in the Python logging module. This may be used by drivers (such as k5test) to output extra information.
1 parent 880dd96 commit bedcb93

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gssapi-console.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import os
99
import sys
1010
import copy
11+
import logging
1112

1213
import pkg_resources as pkgres
1314

@@ -31,10 +32,16 @@
3132
default=None, dest='attach',
3233
help='Attach to an existing gssapi-console environment, '
3334
'indicated by IDENTIFIER.')
35+
parser.add_argument('-v' , '--verbose', default=False, action='store_const',
36+
dest='verbose', const=True,
37+
help='Use a more verbose logging level')
3438

3539

3640
PARSED_ARGS = parser.parse_args()
3741

42+
if PARSED_ARGS.verbose:
43+
logging.basicConfig(level=logging.DEBUG)
44+
3845
realm_args = {}
3946
if PARSED_ARGS.realm_args:
4047
for arg in PARSED_ARGS.realm_args.split(','):

0 commit comments

Comments
 (0)