From 1629141d677c83cb29a451a81705294b5bace8e4 Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Fri, 12 Jan 2024 10:07:58 -0500 Subject: [PATCH] bench: set log level to WARN, make --verbose raise it to INFO (#898) I personally found the output by default somewhat noisy, especially for large requirements files. Since --verbose is already a thing, I propose making the extra output opt-in. --- scripts/bench/__main__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/bench/__main__.py b/scripts/bench/__main__.py index 31884ff10..1b370dddc 100644 --- a/scripts/bench/__main__.py +++ b/scripts/bench/__main__.py @@ -517,12 +517,6 @@ class Puffin(Suite): def main(): """Run the benchmark.""" - logging.basicConfig( - level=logging.INFO, - format="%(asctime)s %(levelname)s %(message)s", - datefmt="%Y-%m-%d %H:%M:%S", - ) - parser = argparse.ArgumentParser( description="Benchmark Puffin against other packaging tools." ) @@ -603,6 +597,11 @@ def main(): ) args = parser.parse_args() + logging.basicConfig( + level=logging.INFO if args.verbose else logging.WARN, + format="%(asctime)s %(levelname)s %(message)s", + datefmt="%Y-%m-%d %H:%M:%S", + ) verbose = args.verbose warmup = args.warmup