在哪里可以找到log4j的ZeroConfSocketHubAppender的源代码? [英] Where can I find the source code for log4j's ZeroConfSocketHubAppender?

查看:117
本文介绍了在哪里可以找到log4j的ZeroConfSocketHubAppender的源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种使log4net支持zeroconf以将日志发布到Apache Chainsaw的方法(请参见此处: log4net是否支持zeroconf?).显然,log4j已经可以使用ZeroConfSocketHubAppender做到这一点.

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.

我在哪里可以查看Java ZeroConfSocketHubAppender的源代码?我在Apache Chainsaw和Log4j存储库中都进行了查看,但未成功.

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.

推荐答案

ZeroConf是log4j的同伴",但是由于log4j中大多数基于网络的附加器都具有ZeroConf,因此不再需要ZeroConfSocketHubAppender(以及此同伴).支持从log4j 1.2.16开始内置.

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.

启用ZeroConf所需要做的就是将jmdns.jar添加到您的类路径中,并在附加程序配置中将"advertiseViaMulticastDNS"参数设置为"true".

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.

这是提交&日志信息,描述了更改,这些更改改进了在附加程序(和接收程序)中对ZeroConf的支持: http://svn.apache.org/viewvc?view=revision&revision= 924176

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

如果您仍想使用该链接,请点击此处链接到ZeroConf页面. http://logging.apache.org/log4j/companions/zeroconf/source-repository.html

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

顺便说一下,Chainsaw的svn HEAD版本(即将发布)包括对使用公布的ZeroConf追加器信息自动创建接收器的支持.

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.

这篇关于在哪里可以找到log4j的ZeroConfSocketHubAppender的源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆