Content might be outdated
Enable logging to HTTP Event Collector in your Java project - http://dev.splunk.com/view/splunk-logging-java/SP-CAAAE7M
NB! Log4j2 newer than 2.8.2 has its own Http handler, which overrides the one from Splunk, so you have to stay at version 2.8.2 (or compile the Splunk log4jhandler yourself with a fix)
log4j2.xml (for Windows systems)