English 中文(简体)
Where can I find the source code for log4j s 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.

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 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.

问题回答

暂无回答




相关问题
Specify time zone of log4j s date

Is it possible to specify the time zone that log4j will use? I need the dates in the log file to be a different time zone than the application s. log4j s PatternLayout uses SimpleDateFormat. ...

java wrapper around log4j logger and java.util.logging

I am writing a library. The library can be used by applications that use log4j loggers and java.util.logging loggers. So, I wrote a quick wrapper class, that encapsulates both loggers. I allow the ...

Grails log4j configuration

I ve repeatedly had problems with the DSL introduced by Grails in version 1.1 for configuring Log4J. My current configuration looks like this: log4j = { debug com.mypackages ...

Creating daily logs with Log4j?

What configuration values are needed to setup Log4j to use the following pattern? MyApp-Mon.log MyApp-Tue.log MyApp-Wed.log Etc With each file containing the days log. This sounds easy enough to do ...

Overriding log4j settings at deploy time

For an application which is deployed on a large number of machines I took the decision to deploy a standard log4j.xml file with the application package, just to make sure that have the same settings ...

How to validate Java logging properties files?

I have a basic facility for allowing users to remotely apply changes to the logging files in my application. Some logs are configured using java.util.logging properties files, and some are configured ...

How do you Change a Package s Log Level using Log4j?

I ve encountered the following bug: http://issues.apache.org/jira/browse/AXIS2-4363 It states the following: This error only occurs when log level for org.apache.axiom is DEBUG so a ...

热门标签