Hi Eric,

are you sure that your application is using Logback for logging and that 
the GELF appender(s) have been put in the correct location on disk to be 
loaded on the JVM classpath?

Apache Tomcat itself is using a fork of the Apache Commons Logging library 
(see https://tomcat.apache.org/tomcat-8.0-doc/logging.html) which is using 
the logging facilities of the Java SE standard libraries (java.util.logging) 
by default.


Cheers,
Jochen

On Friday, 29 January 2016 22:26:46 UTC+1, Eric Smith wrote:
>
> Hi,
>
> We have several existing Java based web apps (tomcat), and we're using 
> logback for logging locally.  Now I'm trying to get the log entries sent 
> using UDP to a Graylog2 server, but I'm not having any luck.  I have tomcat 
> logs showing up in Graylog2 using logstash (ex. Server startup in 32674 
> ms), so I'm confident Graylog2 is working.  I've tried several different 
> handlers and used their example logback.xml:
>
>    - https://github.com/mp911de/logstash-gelf
>    - https://github.com/Moocar/logback-gelf
>    - https://github.com/pukkaone/logback-gelf
>
> Example logback.xml (logstash):
>
> <!DOCTYPE configuration>
>
> <configuration>
>     <contextName>test</contextName>
>     <jmxConfigurator/>
>
>     <appender name="gelf" 
> class="biz.paluch.logging.gelf.logback.GelfLogbackAppender">
>         <host>udp:10.0.x.x</host>
>         <port>12201</port>
>         <version>1.1</version>
>         <facility>java-test</facility>
>         <extractStackTrace>true</extractStackTrace>
>         <filterStackTrace>true</filterStackTrace>
>         <mdcProfiling>true</mdcProfiling>
>         <timestampPattern>yyyy-MM-dd HH:mm:ss,SSSS</timestampPattern>
>         <maximumMessageSize>8192</maximumMessageSize>
>
>         <!-- This are static fields -->
>         
> <additionalFields>fieldName1=fieldValue1,fieldName2=fieldValue2</additionalFields>
>         <!-- Optional: Specify field types -->
>         
> <additionalFieldTypes>fieldName1=String,fieldName2=Double,fieldName3=Long</additionalFieldTypes>
>
>         <!-- This are fields using MDC -->
>         <mdcFields>mdcField1,mdcField2</mdcFields>
>         <dynamicMdcFields>mdc.*,(mdc|MDC)fields</dynamicMdcFields>
>         <includeFullMdc>true</includeFullMdc>
>         <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
>             <level>TRACE</level>
>         </filter>
>     </appender>
>
>     <root level="TRACE">
>         <appender-ref ref="gelf" />
>     </root>
> </configuration>
>
> Is there a simple example application (or web app) that works that I can 
> download and try?  I'd like to get working source code so that I can verify 
> my setup and then figure out what I'm doing wrong.
>
> Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/a498d5e1-6218-4e1f-9f04-82db41391dc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to