How to log in json format?

Did you figure this out?
As I am maybe facing the same issue.