A novel pattern-based edit distance for automatic log parsing