Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

log to graylog2 by adding external jar to classpath

avatar
New Member

Hi,

in order to log errors and stacktraces to Graylog2 I had the following intention

- manually put the https://github.com/Moocar/logback-gelf as a jar into the nifi dir

- add the jar to the classpath

- change the logback config and add the gelf-appender.

Now, nifi.sh is only loading the bootstrap process that runs nifi. So adding the jar to the cp there is no help. Any idea how I can achieve the effect without touching the nifi source and compile myself?

Thanks for the help!

John

1 ACCEPTED SOLUTION

avatar
New Member

This works actually, by placing the .jar file into the lib and the lib/bootstrap folder and then just applying the changes to the logback.xml like usually.

<appender name="GELF" class="de.siegmar.logbackgelf.GelfUdpAppender">
  <graylogHost>ip</graylogHost>
  <graylogPort>12201</graylogPort>
</appender>

I am using de.siegmar:logback-gelf/1.0.3.

Issue resolved for me.

View solution in original post

1 REPLY 1

avatar
New Member

This works actually, by placing the .jar file into the lib and the lib/bootstrap folder and then just applying the changes to the logback.xml like usually.

<appender name="GELF" class="de.siegmar.logbackgelf.GelfUdpAppender">
  <graylogHost>ip</graylogHost>
  <graylogPort>12201</graylogPort>
</appender>

I am using de.siegmar:logback-gelf/1.0.3.

Issue resolved for me.