How to start using Chainsaw for Log4j?

百般思念 提交于 2019-12-05 08:15:11

I'm one of the Chainsaw authors. Try the latest developer snapshot of Chainsaw, which will be released soon. It has a new configuration UI which should make it much easier to configure, particularly if all you're doing is using a socket appender.

There are a ton of new features in this version. Feel free to email with questions or post to the log4j-user mailing list.

Developer snapshot available here: http://people.apache.org/~sdeboy

Scott

Please use only one file log4j.properties or log4j.xml.And check this article for Chainsaw. It may be helpful to you.

This is sample log4j.properties file for Chainsaw,

  log4j.rootCategory=DEBUG, zeroconf, chainsaw
  # Socket Appender
  log4j.appender.chainsaw=org.apache.log4j.net.SocketAppender
  log4j.appender.chainsaw.remoteHost=localhost
  log4j.appender.chainsaw.port=4445
  log4j.appender.chainsaw.locationInfo=true

start server first means in chainsaw log server receiver you can select first socket receiver.

log4j.rootLogger=DEBUG, CHAINSAW_CLIENT

log4j.appender.CHAINSAW_CLIENT=org.apache.log4j.net.SocketAppender log4j.appender.CHAINSAW_CLIENT.RemoteHost=localhost log4j.appender.CHAINSAW_CLIENT.Port=4445
log4j.appender.CHAINSAW_CLIENT.LocationInfo=true

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!