Test logging of custom errors