diff options
Diffstat (limited to 'test')
| -rwxr-xr-x | test/stress/test.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/stress/test.py b/test/stress/test.py index 4f40b15..407b13a 100755 --- a/test/stress/test.py +++ b/test/stress/test.py @@ -257,11 +257,20 @@ def _parse_args(argv=None): @contextmanager def _setup_logging(): + level_names = { + logging.DEBUG: "DBG", + logging.INFO: "INFO", + logging.WARNING: "WARN", + logging.ERROR: "ERR", + logging.CRITICAL: "CRIT", + } + for lvl, name in level_names.items(): + logging.addLevelName(lvl, name) + logging.basicConfig( level=logging.DEBUG, datefmt="%Y-%m-%d %H:%M:%S%z", - # The 8 below is for "CRITICAL" - format="%(asctime)s | %(levelname)8s | %(message)s", + format="%(asctime)s | %(levelname)4s | %(message)s", ) try: yield |
