Process Id in Logback Logging Pattern
<p>I have the following logback pattern:</p>

<pre class="lang-xml prettyprint-override"><code>&lt;pattern&gt;
    {"hostname": "${HOSTNAME}", 
     "level": "%p", 
     "method": "%M", 
     "process_id": "${process}", 
     "thread_id": "%t", 
     "timestamp": "%d{Y-M-d}T%d{H:M:S.s}", 
     "mesg":"%msg"}%n
&lt;/pattern&gt;
</code></pre>

<p>Unfortunately when the log messages are actually generated I see: <code>"process_id": "process_IS_UNDEFINED"</code></p>

<p>Is there any automatically set variable for process id, such as there is for hostname? I am having a lot of trouble finding a documented list of such automatically set variables in the logback documentation, does anyone know of a better documentation source?</p>

<p>Edit: I am aware of Mapped Diagnostic Contexts, but was hoping for a builtin solution that does not need such setup, much like how hostname works.</p>