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

Commit

Permalink
CORTX-34050: support bundle: rgw log directory not present in server …
Browse files Browse the repository at this point in the history
…pod logs. (#875)

Signed-off-by: Shriya Deshmukh <shriya.deshmukh@seagate.com>
  • Loading branch information
shriya-deshmukh authored Aug 26, 2022
1 parent 7b37589 commit 9df754d
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 9df754d

Please sign in to comment.