Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending logs to Graylog and in Gelf format

I would like to use graylog as central logging server and currently I am just using slf4j Logger "slf4j-api" as Java logging framework for logging in my java application. Can i use SLF4J to send logging to Graylog? or Which additional libraries do i need to send these logs to Graylog?

like image 457
orcl user Avatar asked Oct 18 '22 07:10

orcl user


1 Answers

SLF4J is just a facade for other logging libraries.

You have to use a GELF appender for the specific logging framework (Log4j, Logback, java.util.logging, etc.) you're using in your application.

Check out the Graylog Marketplace for existing GELF appenders for Java logging frameworks:

https://marketplace.graylog.org/addons?tag=java

like image 50
joschi Avatar answered Oct 20 '22 00:10

joschi