Skip to content

Commit 4b05d52

Browse files
author
Carlos Gonzalez Betancort
committed
MB-34972 Fix cblogredaction error when -v not given
Change-Id: I98c5399e6b1c011cd772cf975a88a167570677ed Reviewed-on: http://review.couchbase.org/111810 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Patrick Varley <patrick@couchbase.com> Reviewed-by: Toby Wilds <toby.wilds@couchbase.com>
1 parent 20682f4 commit 4b05d52

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cblogredaction

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,13 @@ def _main():
116116
args = opts.parse_args()
117117

118118
log_level = None
119-
if args.verbose >= 2:
119+
if args.verbose is None:
120+
log_level = logging.WARN
121+
elif args.verbose >= 2:
120122
log_level = logging.DEBUG
121123
elif args.verbose == 1:
122124
log_level = logging.INFO
123-
else:
124-
log_level = logging.WARN
125+
125126
logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s', datefmt='%Y/%m/%dT%H:%M:%S', level=log_level)
126127

127128
# Unique list in case the same file is passed in twice

0 commit comments

Comments
 (0)