在哪里可以找到 log4j ZeroConfSocketHubAppender 的源代码?
我正在寻找一种使 log4net 支持 Zeroconf 将日志发布到 Apache Chainsaw 的方法(请参阅此处:log4net 是否支持zeroconf?)。显然 log4j 已经可以使用 ZeroConfSocketHubAppender 来做到这一点。
我在哪里可以查看 java ZeroConfSocketHubAppender 的源代码?我查看了 Apache Chainsaw 和 Log4j 存储库,但没有成功。
I'm looking for a way to make log4net support zeroconf to publish logs to Apache Chainsaw (see here: Does log4net support zeroconf?). Apparently log4j can already do this using a ZeroConfSocketHubAppender.
Where might I be able to view the source for the java ZeroConfSocketHubAppender? I've looked both in the Apache Chainsaw and in the Log4j repositories but was unsuccessful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ZeroConf 是 log4j 的“伴侣”,但不再需要 ZeroConfSocketHubAppender(以及此伴侣),因为从 log4j 1.2.16 开始,log4j 中大多数基于网络的附加程序都内置了 ZeroConf 支持。
要启用 ZeroConf,您所需要做的就是将 jmdns.jar 添加到类路径中,并在附加程序配置中将“advertiseViaMulticastDNS”参数设置为“true”。
这是提交和日志信息描述了改进了附加器(和接收器)中 ZeroConf 支持的更改:
http://svn.apache.org/viewvc?view=revision&revision= 924176
如果您仍想使用 ZeroConf 页面,这里有一个链接
http://logging.apache.org/log4j/companions/zeroconf/ source-repository.html
顺便说一句,Chainsaw 的 svn HEAD 版本(应该很快就会发布)包括对使用宣传的 ZeroConf 附加程序信息自动创建接收器的支持。
ZeroConf is a log4j 'companion', but ZeroConfSocketHubAppender (and this companion) is no longer necessary due to the fact that most network-based appenders in log4j have ZeroConf support built-in as of log4j 1.2.16.
All you need to do to enable ZeroConf is add jmdns.jar to your classpath and set the 'advertiseViaMulticastDNS' param to 'true' in the appender configuration.
Here's the commit & log info describing the changes which improved ZeroConf support in the appenders (and receivers):
http://svn.apache.org/viewvc?view=revision&revision=924176
Here is a link to the ZeroConf page if you still want to use that
http://logging.apache.org/log4j/companions/zeroconf/source-repository.html
By the way, the svn HEAD revision of Chainsaw (which should be released soon) includes support for using the advertised ZeroConf appender information to automatically create receivers.