title: How to get GELFJ appender work in log4j?
body: <p>I need to get my Java application writing logging to a Graylog2 server.
  The application uses a log4j configuration.
  Several things I have tried to get the logging writing to the Graylog2 server, the things I got working was sending a test message directly to the server, as shown <a href="https://github.com/t0xa/gelfj/wiki#examples" rel="noreferrer">here</a> (first example).</p>
  
  <p>Yet, when I write an appender and attach it to the root logger, I always get this error message the first time a log event is to be fired:</p>
  
  <p><em>log4j:ERROR Could not send GELF message</em></p>
  
  <p>Nothing then happens on the Graylog2 server side.</p>
  
  <p>The appender I try to get working:</p>
  
  <pre><code>&lt;appender name="graylog2" class="org.graylog2.log.GelfAppender"&gt;
      &lt;param name="graylogHost" value="127.0.0.1"/&gt;
      &lt;param name="originHost" value="my.machine.example.com"/&gt;
      &lt;param name="extractStacktrace" value="true"/&gt;
      &lt;param name="addExtendedInformation" value="true"/&gt;
      &lt;param name="facility" value="gelf-java"/&gt;
      &lt;param name="Threshold" value="INFO"/&gt;
      &lt;param name="additionalFields" value="{'environment': 'DEV', 'application': 'MyAPP'}"/&gt;
  &lt;/appender&gt;
  </code></pre>
  
  <p>Does anyone have an idea how to get this running?<br />
  Any help is highly appreciated!</p>