Skip to content

Commit de40109

Browse files
committed
Limit logging to INFO and above by default
Previously, specifying enough -v options made DEBUG messages visible. Signed-off-by: John Pennycook <john.pennycook@intel.com>
1 parent a5c34b9 commit de40109

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

codebasin/__main__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ def _main():
168168
log_path = os.path.abspath("cbi.log")
169169
print(f"Log file created at {log_path}")
170170

171-
log_level = max(1, logging.ERROR - 10 * (args.verbose - args.quiet))
171+
log_level = max(
172+
logging.INFO,
173+
logging.ERROR - 10 * (args.verbose - args.quiet),
174+
)
172175
stdout_handler = logging.StreamHandler(sys.stdout)
173176
stdout_handler.setLevel(log_level)
174177
stdout_handler.setFormatter(Formatter(colors=sys.stdout.isatty()))

0 commit comments

Comments
 (0)