title: Java GrayLog Integration Using Gelf
body: <p>I want to do graylog integration in java by using "gelf" library. I added config parameters in order to connect graylog server into "log4j_Appender.xml" </p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;Configuration status="info" packages="org.graylog2.log4j2"&gt;
       &lt;Appenders&gt;
        &lt;GELF name="gelfAppender" server="graylog.llm.com" port="12212" hostname="llmtest.llm.com" protocol="UDP" includeThreadContext="true"&gt;
         &lt;KeyValuePair key="grayloggroup" value="LLMFIGHTTEST" /&gt;
         &lt;KeyValuePair key="application" value="baggagebustest" /&gt;
         &lt;KeyValuePair key="environment" value="baggagebustest" /&gt;
  
      &lt;!--    &lt;Filters&gt; --&gt;
      &lt;!--     &lt;Filter type="MakerFilter" marker="FLOW" onMatch="DENY" onMismatch="NEUTRAL"&gt;&lt;/Filter&gt; --&gt;
      &lt;!--     &lt;Filter type="MakerFilter" marker="EXCEPTION" onMatch="DENY" onMismatch="ACCEPT"&gt;&lt;/Filter&gt; --&gt;
      &lt;!--    &lt;/Filters&gt; --&gt;
         &lt;PatternLayout pattern="%m%n"/&gt;
        &lt;/GELF&gt;
       &lt;/Appenders&gt;
       &lt;Loggers&gt;
        &lt;Root level="info"&gt;
         &lt;AppenderRef ref="gelfAppender" /&gt;
        &lt;/Root&gt;
       &lt;/Loggers&gt;
      &lt;/Configuration&gt;
  </code></pre>
  
  <p>But I can not connect to "graylog.llm.com"  and I don't add a log into "LLMFIGHTTEST" stream.</p>
  
  <p>I am using <a href="https://github.com/graylog-labs/log4j2-gelf" rel="nofollow noreferrer">this</a> project in github.</p>