I have multiple versions of the same application deployed on one tomcat. Both those applications have the same log4j config. So when we use chainsaw only one versions logs show up in chainsaw .
This is what I have in my log4j
log4j.appender.HUB=org.apache.log4j.net.SocketHubAppender
log4j.appender.HUB.port=39867
log4j.appender.HUB.LocationInfo=true
log4j.appender.HUB.Threshold=INFO
log4j.appender.HUB.application=remotehost
Is there a way I keep one log4j file and have port assigned dynamically for chaisaw?
If you add JMDNS to your classpath, you can use the ZeroConf support in log4j1.2.17's SocketHubAppender with the latest developer snapshot of Chainsaw in order to 'discover' the sockethubappender configuration in Chainsaw.
When you restart your app and Chainsaw, you should have a 'zeroconf' tab in Chainsaw which lists your sockethubappender entries.
Double click on an entry in the ZeroConf tab to open a new tab and start receiving entries from the SocketHubAppender for that app.