@mathpunk You might want to look at how #cambium does it. Since you already have a Java application, you can probably drop the relevant layout class in the classpath, and tweak the logback.xml file to emit it as data.
logback.xml