Extracting the error information from log via machine learning

Hi experts,
I’d like to code a function of extracting the error information from log files by machine learning.
Is there any 3rd package for developing this kind of function? or what kinds of package do I need to use to train the model. I am a new comer of machine learning.

Thank you in advance.