add indent support to console_log()
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
[ROCm/rocprofiler-compute commit: 63129e4247]
Cette révision appartient à :
révisé par
Karl W. Schulz
Parent
890154db8e
révision
b948aa6ebf
@@ -56,11 +56,15 @@ def console_error(*argv):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def console_log(*argv):
|
||||
def console_log(*argv,indent_level=0):
|
||||
indent = ''
|
||||
if indent_level >= 1:
|
||||
indent = ' ' * 3 * indent_level + '|-> ' # spaces per indent level
|
||||
|
||||
if len(argv) > 1:
|
||||
logging.info(f"[{argv[0]}] {argv[1]}")
|
||||
logging.info(indent + f"[{argv[0]}] {argv[1]}")
|
||||
else:
|
||||
logging.info(f"{argv[0]}")
|
||||
logging.info(indent + f"{argv[0]}")
|
||||
|
||||
|
||||
def console_debug(*argv):
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur