master > master: code - logging sauberer - debug jetzt verblasst

This commit is contained in:
RD 2021-10-24 12:32:59 +02:00
parent 96968cf8dd
commit ab0fd15093
2 changed files with 5 additions and 2 deletions

View File

@ -85,7 +85,10 @@ def logInfo(*lines: Any, force: bool = False, tag_all: bool = True, file: Any =
def logDebug(*lines: Any, force: bool = False, tag_all: bool = True, file: Any = None):
if not _debugmode:
return;
logGeneric('[\033[96;1mDEBUG\033[0m]', *lines, force=force, tag_all=tag_all, file=file or sys.stdout);
logGeneric('\033[2m[\033[96;1mDEBUG\033[0m\033[2m]\033[0m',
*[ '\033[2m{}\033[0m'.format(line) for line in lines ],
force=force, tag_all=tag_all, file=file or sys.stdout
);
def logWarn(*lines: Any, force: bool = False, tag_all: bool = False, file: Any = None):
logGeneric('[\033[93;1mWARNING\033[0m]', *lines, force=force, tag_all=tag_all, file=file or sys.stdout);

View File

@ -38,7 +38,7 @@ def DisplayEndOfAlgorithm(*_: Any, **outputs: Any):
return;
def DisplayMetrics():
logPlain('Dauer der Ausführung: t = \033[2m{}\033[0m'.format(TimeElapsed()));
logPlain('Dauer der Ausführung: t = \033[1m{}\033[0m'.format(TimeElapsed()));
logPlain('Anzahl der Schritte: T(n) = \033[1m{}\033[0m'.format(NumberOfSteps()));
return;