Skip to content

Commit

Permalink
Fix message line formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JuniorIsAJitterbug committed May 4, 2024
1 parent f39cc21 commit c5191cc
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/tbc_video_export/process/progress_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,15 @@ def _get_last_messages_line(self, max_line_length: int) -> str:
# get the last N log lines, padding out the list if they do not exist
for message in messages + [None] * (max_message_lines - len(messages)):
if message is not None:
sender_str = "[{consts.APPLICATION_NAME}]"

process = (
f"{f'[{message.process}]':<{self._col_w['sender']}s}"
sender = (
f"[{message.process}]"
if message.process is not ProcessName.NONE
else f"{sender_str}:<{self._col_w['sender']}s"
else f"[{consts.APPLICATION_NAME}]"
)

formatted_line = (
f"[{strings.formatted_timestamp(message.timestamp)}] "
f"{process}{message.message}"
f"{sender:<{self._col_w['sender']}s}{message.message}"
)

fixed_log_lines.append(
Expand Down

0 comments on commit c5191cc

Please sign in to comment.