Anomaly detection in text log files

hi I am looking for an approach / examples to do anomaly detection in text log files.

Basically I want to extract everything that is not supposed to be there like error messages or new log messages (which should then be relearned) and so on.