Skip to content

Commit

Permalink
Removed truncation of log messages to fit the console screen in 'rf_l…
Browse files Browse the repository at this point in the history
…ogs.py'

Signed-off-by: Mike Raineri <[email protected]>
  • Loading branch information
mraineri committed Jun 7, 2024
1 parent b903f29 commit 15a3cc5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions redfish_utilities/logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
with the log service for a given Redfish service
"""

import shutil

from .messages import verify_response
from enum import Enum

Expand Down Expand Up @@ -113,8 +111,6 @@ def print_log_entries(log_entries, details=False):
"""

# Set up templates
console_size = shutil.get_terminal_size(fallback=(80, 24))
message_size = console_size.columns - 38
entry_line_format = " {:5s} | {:25s} | {}"
detail_line_format = " {:33s} | {}: {}"
detail_list = [
Expand Down Expand Up @@ -144,7 +140,7 @@ def print_log_entries(log_entries, details=False):
entry_line_format.format(
entry["Id"],
entry.get(timestamp_property, "Unknown"),
entry["Message"].replace("\n", "; ")[:message_size],
entry["Message"].replace("\n", "; "),
)
)
if details:
Expand Down

0 comments on commit 15a3cc5

Please sign in to comment.