Skip to content

Commit 50c71cb

Browse files
committed
always INFO log in --provenance log
that is on --quiet we only reduce log level on stderr logger If --debug then provenance log file will also be more verbose, but it will never be less verbose than INFO
1 parent 2b4697f commit 50c71cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cwltool/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,19 +492,23 @@ def main(argsl=None, # type: List[str]
492492
if not hasattr(args, key):
493493
setattr(args, key, val)
494494

495+
## Configure logging
495496
rdflib_logger = logging.getLogger("rdflib.term")
496497
rdflib_logger.addHandler(stderr_handler)
497498
rdflib_logger.setLevel(logging.ERROR)
498499
if args.quiet:
499-
_logger.setLevel(logging.WARN)
500+
# Silence STDERR, not an eventual provenance log file
501+
stderr_handler.setLevel(logging.WARN)
500502
if runtimeContext.debug:
503+
# Increase to debug for both stderr and provenance log file
501504
_logger.setLevel(logging.DEBUG)
502505
rdflib_logger.setLevel(logging.DEBUG)
503506
formatter = None # type: Optional[logging.Formatter]
504507
if args.timestamps:
505508
formatter = logging.Formatter("[%(asctime)s] %(message)s",
506509
"%Y-%m-%d %H:%M:%S")
507510
stderr_handler.setFormatter(formatter)
511+
##
508512

509513
if args.version:
510514
print(versionfunc())

0 commit comments

Comments
 (0)