Fully agree with bchen, you will get serialized garble in your messages on the splunk index using SocketAppender. Log4j properties example below just alter SyslogHost values. Port is optional, but useful to create various index sources.
We use another appender to created log files of same data, used to fill long term analysis, feed those to splunk in different index.
example for syslog appender log4j
log4j.appender.SPLUNKiT=org.apache.log4j.net.SyslogAppender
log4j.appender.SPLUNKiT.SyslogHost=[:CustomPort]
log4j.appender.SPLUNKiT.layout=org.apache.log4j.PatternLayout
log4j.appender.SPLUNKiT.layout.ConversionPattern=sv-cdr-posted - %m
log4j.appender.SPLUNKiT.Facility=USER
... View more