How to find similar meaning log messages in the source code? Currently we have 10 thoundands log messages in the source codes which is maintained by different groups.
Some messages may be similar, but the sentence is not the same. My purpose is to create a centralized file which contains the unified message for reference.
For example:

printf(&quot;Failed to open the file %s&quot;, file)
printf(&quot;%s: failed to open file %s&quot;, TIMESTAMP, file)
printf(&quot;Failed to create the file %s&quot;)

I can extract all the message body which is in bold.They are not strict English sentence. but manually categorizing them takes too much time.
Is there a way to automatically categorizing the logs?
I just want to reduce the manual work.
A simple idea, non-supervision:
 1.Stemming, reduceing punctuations. Then you can use Bag of word with TF-IDF to represent the log sentences. 


Run K-means to cluster your sentences. If your sentences are belong to 
5 type. You can set K=5.


Of course, you can use Regular Express to classify those sentences.