add indent support to console_log()
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
This commit is contained in:
committed by
Karl W. Schulz
parent
34694f86c2
commit
63129e4247
+7
-3
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user