I am trying to stream my logs through the log4j socket appender and trying to retrieve the same through the logstash log4j input plugin. My logstash configuration looks like
input {
log4j
{
type=>"socketlogs"
port=>"1995"
}
}
output {
stdout {}
file
{ path=>"socket.log"}
}
My log4j.xml looks like below
<appender name="logstashsocketappender" class="org.apache.log4j.net.SocketAppender">
<param name="RemoteHost" value=<logstash ip>/>
<param name="Port" value="1995"/>
<param name="ReconnectionDelay" value="60000"/>
<param name="Threshold" value="INFO"/>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="logstashsocketappender"/>
</root>
I have a logger.info statement in the code for testing, however I do not see those in stdout in the logstash machine. These are the software versions I am using
logstash - 1.4.2 log4j - 1.7.5
Let me know if I am missing something here.
Thanks for the help Gowri