This post is the outcome of my own experience when trying to log JSON objects on a Spring boot Java app using Log4J2. We find it really hard to accomplish that since we couldn't find proper documentation. So, hopefully this post will help if you ever have to deal with such situation.