refactor(classifier): 🎨 readapt code to its intial structure
move the test on the error_name value as it was before the fix of deduplications
This commit is contained in:
@@ -85,8 +85,6 @@ def classify_log_entries(
|
||||
logger.info("\tclassification job started.")
|
||||
for log_entry in log_entries:
|
||||
error_name = _match_n2_pattern(log_entry)
|
||||
if error_name:
|
||||
log_entry.error_name = error_name
|
||||
|
||||
if previous_log_entry is not None and _is_duplicate_error(
|
||||
previous_log_entry, log_entry
|
||||
@@ -96,7 +94,8 @@ def classify_log_entries(
|
||||
)
|
||||
continue
|
||||
|
||||
if log_entry.error_name:
|
||||
if error_name:
|
||||
log_entry.error_name = error_name
|
||||
logger.info(
|
||||
f"\t\tError '{error_name}' associated with log entry '{log_entry.error_message}'. This is a n2 log entry"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user