few more reverts

This commit is contained in:
svlandeg 2025-10-29 11:45:02 +01:00
parent cbd560a83d
commit 3fa974f93c

View File

@ -20,7 +20,6 @@ class ColoredFormatter(logging.Formatter):
} }
RESET = '\033[0m' RESET = '\033[0m'
BOLD = '\033[1m' BOLD = '\033[1m'
def format(self, record): def format(self, record):
# Add color to the level name # Add color to the level name
levelname = record.levelname levelname = record.levelname
@ -35,7 +34,6 @@ class ColoredFormatter(logging.Formatter):
message = re.sub(r'(Shard \d+)', rf'{self.COLORS["INFO"]}{self.BOLD}\1{self.RESET}', message) message = re.sub(r'(Shard \d+)', rf'{self.COLORS["INFO"]}{self.BOLD}\1{self.RESET}', message)
return message return message
def setup_default_logging(): def setup_default_logging():
handler = logging.StreamHandler() handler = logging.StreamHandler()
handler.setFormatter(ColoredFormatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')) handler.setFormatter(ColoredFormatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s'))