Logback (via the logback.xml file) gives you programmatic access to standard logging output (which is distinct from stdout
of the process, but generally all you need for debugging).
There’s some discussion in this thread about using that output more directly in other tools.