Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit 2b50a8f

Browse files
fix: add new logging
1 parent 1937d85 commit 2b50a8f

File tree

3 files changed

+6
-45
lines changed

3 files changed

+6
-45
lines changed

codecov_cli/helpers/folder_searcher.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -72,27 +72,7 @@ def search_files(
7272
_is_excluded, filename_exclude_regex, multipart_exclude_regex
7373
)
7474
for dirpath, dirnames, filenames in os.walk(folder_to_search):
75-
logger.debug(
76-
"search_files.os_walk",
77-
extra=dict(
78-
extra_log_attributes=dict(
79-
folder_to_search=folder_to_search,
80-
dirpath=dirpath,
81-
dirnames=dirnames,
82-
filenames=filenames,
83-
),
84-
),
85-
)
8675
dirs_to_remove = set(d for d in dirnames if d in folders_to_ignore)
87-
logger.debug(
88-
"search_files.dirs_to_remove",
89-
extra=dict(
90-
extra_log_attributes=dict(
91-
dirs_to_remove=dirs_to_remove,
92-
folders_to_ignore=folders_to_ignore,
93-
),
94-
),
95-
)
9676

9777
if multipart_exclude_regex is not None:
9878
dirs_to_remove.union(
@@ -108,16 +88,6 @@ def search_files(
10888
# This is the documented way of doing this on python docs
10989
dirnames.remove(directory)
11090

111-
logger.debug(
112-
"search_files.post_dir_removal",
113-
extra=dict(
114-
extra_log_attributes=dict(
115-
dirnames=dirnames,
116-
search_for_directories=search_for_directories,
117-
),
118-
),
119-
)
120-
12191
if search_for_directories:
12292
for directory in dirnames:
12393
dir_path = pathlib.Path(dirpath) / directory
@@ -126,18 +96,6 @@ def search_files(
12696
else:
12797
for single_filename in filenames:
12898
file_path = pathlib.Path(dirpath) / single_filename
129-
logger.debug(
130-
"search_files.search_for_filenames",
131-
extra=dict(
132-
extra_log_attributes=dict(
133-
single_filename=single_filename,
134-
file_path=file_path,
135-
is_excluded=this_is_excluded(file_path),
136-
is_included=this_is_included(file_path),
137-
yield_it=(not this_is_excluded(file_path) and this_is_included(file_path)),
138-
),
139-
),
140-
)
14199
if not this_is_excluded(file_path) and this_is_included(file_path):
142100
yield file_path
143101

codecov_cli/helpers/versioning_systems.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ def list_relevant_files(
220220
extra=dict(
221221
extra_log_attributes=dict(
222222
dir_to_use=dir_to_use,
223-
files=files,
223+
len_files=len(files),
224+
files=files[:100],
224225
),
225226
),
226227
)
@@ -233,7 +234,8 @@ def list_relevant_files(
233234
extra=dict(
234235
extra_log_attributes=dict(
235236
dir_to_use=dir_to_use,
236-
return_files=return_files,
237+
len_return_files=len(return_files),
238+
return_files=return_files[:100],
237239
),
238240
),
239241
)

codecov_cli/services/upload/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ def do_upload_logic(
166166
text="Data NOT sent to Codecov because of dry-run option",
167167
)
168168
with open('coverage_report.txt', 'w+') as f:
169-
print(upload_data)
169+
print(f"Network Files Sample: {upload_data.network[:100]}")
170+
print(f"Total network files: {len(upload_data.network)}")
170171
f.write('\n'.join(upload_data.network))
171172
f.write("<<< network")
172173
f.write('\n'.join(upload_data.file_fixes))

0 commit comments

Comments
 (0)