Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

CORTX-34050: support bundle: rgw log directory not present in server pod logs. #875

Merged
merged 1 commit into from
Aug 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion py-utils/src/utils/support_framework/log_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ def limit_time(src_dir, dest_dir, duration, file_name_reg_ex,
start_time, end_time = FilterLog._parse_duration(duration)
for file in os.listdir(src_dir):
op_file = os.path.join(dest_dir, 'tmp_' + file)
if file.startswith(file_name_reg_ex):
# TODO: Handle time based log collection for rotated files('.gz') files
if file.startswith(file_name_reg_ex) and not file.endswith('.gz'):
in_file = os.path.join(src_dir, file)
with open(in_file, 'r') as fd_in, open(op_file, 'a') as fd_out:
line = fd_in.readline()
Expand Down