Why is Socket Receiver inactive in Chainsaw?

六眼飞鱼酱① 提交于 2019-12-24 19:24:20

问题


When I start ChainSaw (using a simple Receiver on port 4445)

I see its: properties

active  false
class   class org.apache.log4j.net.SocketReceiver
connectedSocketDetails  []
listener    
loggerRepository    org.apache.log4j.Hierarchy@1c3dc66
name    SocketReceiver
paused  false
port    4445
threshold   TRACE

Probably I cannot see my logs due to the fact that Socket Receiver is inactive. How could I change it? If you are experienced in using Chainsaw could you also check if my log4j.properties are ok?

log4j.rootLogger=DEBUG, server

log4j.appender.server=org.apache.log4j.net.SocketAppender
log4j.appender.server.Port=4445
log4j.appender.server.RemoteHost=localhost
log4j.appender.server.ReconnectionDelay=10000

回答1:


Are you using the Web Start version of Chainsaw? We are going to be releasing an updated of Chainsaw soon, with a lot of new features - would you mind downloading the developer snapshot and giving that a try? It's not yet available via Web Start.

When Chainsaw starts you should be prompted with a (new) configuration dialog where you can ask it to set up a socket receiver and provide the port, and tell it to always use this configuration.

Here's the link to the developer snapshot: http://people.apache.org/~sdeboy




回答2:


You can use this property file.when you start chainsaw v2 web start check radio button with let me use simple receiver and select socket receiver and then ok.

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


来源:https://stackoverflow.com/questions/11796027/why-is-socket-receiver-inactive-in-chainsaw

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