update logging formatter handling for consistent behavior with error messsages

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>


[ROCm/rocprofiler-compute commit: 69af2ffc83]
This commit is contained in:
Karl W Schulz
2024-03-14 17:26:47 -05:00
committed by Karl W. Schulz
parent b8b5409d4f
commit 8d6a8e3b06
2 changed files with 13 additions and 4 deletions
@@ -51,9 +51,9 @@ def demarcate(function):
def console_error(*argv, exit=True):
if len(argv) > 1:
logging.error("ERROR: " + f"[{argv[0]}] {argv[1]}")
logging.error(f"[{argv[0]}] {argv[1]}")
else:
logging.error("ERROR: " + f"{argv[0]}")
logging.error(f"{argv[0]}")
if exit:
sys.exit(1)