machine_logger: increase truncation limit to 20

10 was a bit short.
This commit is contained in:
Jörg Thalheim
2024-12-17 17:51:47 +01:00
parent 5ff253508b
commit 09c30b4d10

View File

@@ -60,7 +60,7 @@ class PrefixFormatter(logging.Formatter):
# If command_prefix is set, color the prefix with a unique color. # If command_prefix is set, color the prefix with a unique color.
elif command_prefix: elif command_prefix:
command_prefix = command_prefix[ command_prefix = command_prefix[
:10 :20
] # Truncate the command prefix to 10 characters. ] # Truncate the command prefix to 10 characters.
prefix_color = self.hostname_colorcode(command_prefix) prefix_color = self.hostname_colorcode(command_prefix)
format_str = color_by_tuple(f"[{command_prefix}]", fg=prefix_color) format_str = color_by_tuple(f"[{command_prefix}]", fg=prefix_color)