title: Append specific MDC field into logstash log
body: <p>I am trying add custom field into logstash appender in logback-spring.xml like that:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration&gt;
  &lt;appender name="stash" class="net.logstash.logback.appender.LogstashSocketAppender"&gt;
          &lt;host&gt;xx.xx.xx.xx&lt;/host&gt;
          &lt;port&gt;xxxxx&lt;/port&gt;
          &lt;encoder class="net.logstash.logback.encoder.LogstashEncoder"&gt;
              &lt;includeMdcKeyName&gt;myField&lt;/includeMdcKeyName&gt;
          &lt;/encoder&gt;
  &lt;/appender&gt;
  
  &lt;root level="info"&gt;
      &lt;appender-ref ref="stash" /&gt;
  &lt;/root&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>It gives me error:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.IllegalStateException: Logback configuration error detected: 
    ERROR in ch.qos.logback.core.joran.spi.Interpreter@34:71 - no applicable action for [encoder], current ElementPath  is [[configuration][appender][encoder]]</p>
  </blockquote>
  
  <p>When I tried console appender and I tried print that field like in sample below it worked.</p>
  
  <pre><code>&lt;layout&gt;
        &lt;Pattern&gt;%-4r [%thread] %-5level My Field: [%X{myField:--}] %msg%n&lt;/Pattern&gt;
  &lt;/layout&gt;
  </code></pre>
  
  <p>Can you tell me what I did wrong with udp appender? Thank you in advice.</p>