Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cwltool/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ def arg_parser() -> argparse.ArgumentParser:

volumegroup = parser.add_mutually_exclusive_group()
volumegroup.add_argument("--verbose", action="store_true", help="Default logging")
volumegroup.add_argument("--no-warnings", action="store_true", help="Only print errors.")
volumegroup.add_argument("--quiet", action="store_true", help="Only print warnings and errors.")
volumegroup.add_argument("--debug", action="store_true", help="Print even more logging")

Expand Down
3 changes: 3 additions & 0 deletions cwltool/loghandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

def configure_logging(
stderr_handler: logging.Handler,
no_warnings: bool,
quiet: bool,
debug: bool,
enable_color: bool,
Expand All @@ -25,6 +26,8 @@ def configure_logging(
deps_logger.addHandler(stderr_handler)
ss_logger = logging.getLogger("salad")
ss_logger.addHandler(stderr_handler)
if no_warnings:
stderr_handler.setLevel(logging.ERROR)
if quiet:
# Silence STDERR, not an eventual provenance log file
stderr_handler.setLevel(logging.WARN)
Expand Down
1 change: 1 addition & 0 deletions cwltool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,7 @@ def main(

configure_logging(
stderr_handler,
args.no_warnings,
args.quiet,
runtimeContext.debug,
args.enable_color,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_js_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
("v7.7.3\n", True),
]

configure_logging(_logger.handlers[-1], False, True, True, True)
configure_logging(_logger.handlers[-1], False, False, True, True, True)
_logger.setLevel(logging.DEBUG)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_load_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from .util import get_data

configure_logging(_logger.handlers[-1], False, True, True, True)
configure_logging(_logger.handlers[-1], False, False, True, True, True)
_logger.setLevel(logging.DEBUG)


Expand Down