Skip to content

Commit

Permalink
Merge pull request #160 from DMTF/Log-Line-Length
Browse files Browse the repository at this point in the history
Removed truncation of log messages to fit the console screen in 'rf_logs.py'
  • Loading branch information
mraineri authored Jun 7, 2024
2 parents b7164ae + 15a3cc5 commit 09f8f07
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 09f8f07

Please sign in to comment.