Refactor LogMessageBuilder and add support for ref_ptr's