log4j gelf-appender to log to graylog

Dear community,

I'm trying to forward teamcity (218.2.2) logs to graylog. In theory, it looks pretty straightforward - but - I've got difficulties to find a proper gelf-appender for log4j-1.2. So far I tried:

1) http://central.maven.org/maven2/org/graylog2/gelfj/1.1.12

it works fine a testing environment but suddenly stops under load in production without any logged error.

2) https://logging.paluch.biz/examples/log4j-1.2.x.html

it works fine a testing environment but suddenly stops under load in production with an error in catalina.log:

org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [biz.paluch.logging.gelf.GelfMessageAssembler$1] (value [biz.paluch.logging.gelf.GelfMessageAssembler$1@5ebcd27]) and a value of type [biz.paluch.logging.gelf.intern.PoolingGelfMessageBuilder] (value [biz.paluch.logging.gelf.intern.PoolingGelfMessageBuilder@221e7bdc]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

3) https://github.com/pstehlik/gelf4j/blob/master/build/libs/gelf4j-0.81.jar

doesnt work (propably wring log4j vresion). Error in teamcity-server.log:

ERROR - jetbrains.buildServer.STARTUP - Exception UnknownServerStartupError in stage APPLICATION_STARTING: Could not create the main application servlet: No signature of method: org.apache.log4j.spi.LoggingEvent.getTimeStamp() is applicable for argument types: () values: []

Did anyone succesfully achived to remotelog teamcity?

0
1 comment
Avatar
Permanently deleted user

Were you successful to get TeamCity to log Graylog?

0

Please sign in to leave a comment.