Skip to content

Commit 1ec7a06

Browse files
excel export: enhance error logging
1 parent 05a74d5 commit 1ec7a06

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

dojo/reports/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ def get(self, request):
944944

945945
row_num = 1
946946
for finding in findings:
947+
logger.debug(f"processing finding: {finding.id}")
947948
if row_num == 1:
948949
col_num = 1
949950
for key in dir(finding):
@@ -955,7 +956,7 @@ def get(self, request):
955956
cell.font = font_bold
956957
col_num += 1
957958
except Exception as exc:
958-
logger.error("Error in attribute: " + str(exc))
959+
logger.warning(f"Error in attribute: {key}" + str(exc))
959960
cell = worksheet.cell(row=row_num, column=col_num, value=key)
960961
col_num += 1
961962
continue
@@ -1007,7 +1008,7 @@ def get(self, request):
10071008
worksheet.cell(row=row_num, column=col_num, value=value)
10081009
col_num += 1
10091010
except Exception as exc:
1010-
logger.error("Error in attribute: " + str(exc))
1011+
logger.warning(f"Error in attribute: {key}" + str(exc))
10111012
worksheet.cell(row=row_num, column=col_num, value="Value not supported")
10121013
col_num += 1
10131014
continue

0 commit comments

Comments
 (0)