Fix logging regular expression objects