You could also just use Penna, which is an implementation of the Log4j API which directly (and only) emits JSON; if that's all you need, consider using it instead of Logback. (Your library and application code still logs using the Log4j API.?