Untitled
unknown
plain_text
3 years ago
572 B
9
Indexable
# 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 FalseEditor is loading...