Format log entries. esc->escape. Merge equal regions.