You can create a new Message Definition for your object, and then use the “Export with Mapping” microflow action to convert the object into a JSON string. From there you can put that in your log message.
This process could also be implemented in a generic way for any object using a Java action. I haven’t seen one but I don’t think it would be more than maybe 10-20 lines of code.