Merge pull request 'machine_logger: increase truncation limit to 20' (#2629) from Mic92-shrink-vars-tests into main

This commit is contained in:
clan-bot
2024-12-17 18:22:24 +00:00

View File

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