Improved LogPublicFields method