mirror of
https://github.com/Alex38Lyon/Synthese-PSM_LARRA.git
synced 2026-11-29 19:58:36 +00:00
update
This commit is contained in:
1 parent
596596cf98
commit
3e7ab1a7e2
3 files changed
+77
-2
No files matched your search
@@ -98,10 +98,13 @@ INTERACTIF = sys.stdout.isatty() and sys.stderr.isatty() and os.environ.get("TER
|
||||
#################################################################################################
|
||||
class ConsoleFormatter(logging.Formatter):
|
||||
def format(self, record):
|
||||
color = COLOR_CODES.get(record.levelno, "")
|
||||
message = super().format(record)
|
||||
|
||||
return f"{color}{message}{RESET}" if INTERACTIF else strip_ansi_codes(message)
|
||||
if INTERACTIF:
|
||||
color = COLOR_CODES.get(record.levelno, "")
|
||||
return f"{color}{message}{RESET}"
|
||||
|
||||
return strip_ansi_codes(message)
|
||||
|
||||
|
||||
#################################################################################################
|
||||
|
||||
Reference in new issue
Block a user