diff --git a/src/logwatcher/classifier.py b/src/logwatcher/classifier.py index 2be060d..315f9bd 100644 --- a/src/logwatcher/classifier.py +++ b/src/logwatcher/classifier.py @@ -66,7 +66,7 @@ def _is_duplicate_error(previous: LogEntry, current: LogEntry) -> bool: and previous.mdc_server_name == current.mdc_server_name and previous.store_name == current.store_name and previous.start_time == current.start_time - and _error_identity(previous) == _error_identity(current) + and previous.error_message == current.error_message ) diff --git a/tests/test_classifier.py b/tests/test_classifier.py index 8bf6852..b96e00e 100644 --- a/tests/test_classifier.py +++ b/tests/test_classifier.py @@ -158,7 +158,7 @@ def test_classify_log_entries_merges_consecutive_duplicates(): def test_classify_log_entries_merges_same_error_name(): - """Same error code with a different amount is still a single log entry.""" + """Same error code with a different amount is two different entries.""" log_entries = parse_lines( [ _build_log_line( @@ -172,7 +172,7 @@ def test_classify_log_entries_merges_same_error_name(): relevant, _ = classify_log_entries(log_entries) - assert len(relevant) == 1 + assert len(relevant) == 2 def test_classify_log_entries_keeps_duplicates_from_other_store_or_scan():