Have a look at Splunk Java Logging.
It has a appenders/handlers for log4j, logback and java.util logging, so you can seamlessly integrate it into your Java code for logging to Splunk via REST.
Download it and check out the examples !!
Have a look at Splunk Java Logging.
It has a appenders/handlers for log4j, logback and java.util logging, so you can seamlessly integrate it into your Java code for logging to Splunk via REST.
Download it and check out the examples !!
It works. thanks.
You could use log4j to send data to Splunk over TCP, or you could use the REST API to write data to Splunk. See the receivers endpoint documentation
See also the Splunk Java SDK
My try to use TCP fails 😞
Why? UDP should be avoided for data that needs to have guaranteed delivery.
Actually, I send log to splunk over UDP not TCP.