Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
572 B
1
Indexable
Never
# Define the list of important words
important_words = ['unauthorized','error','kernel error','OS error','rejected','warning',"error", "fail", "exception", "critical",
            "security", "authentication", "intrusion", "attack","status", "performance", "uptime", "load","config", "setting", "permission", "firewall",
            "debug", "trace", "stack"]

output_file = 'output.txt'

# Define the filter function
def filter_log_data(line, important_words):
    for word in important_words:
        if word in line:
            return True
    return False