Update JavaDocs to clarify receiver params
git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/companions/receivers/trunk@673566 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/log4j/net/XMLSocketReceiver.java b/src/main/java/org/apache/log4j/net/XMLSocketReceiver.java
index f78f57c..55dbcca 100644
--- a/src/main/java/org/apache/log4j/net/XMLSocketReceiver.java
+++ b/src/main/java/org/apache/log4j/net/XMLSocketReceiver.java
@@ -34,8 +34,16 @@
socket and "posts" it to a LoggerRepository as if the event were
generated locally. This class is designed to receive events from
the XMLSocketAppender class (or classes that send compatible events).
-
- <p>Once the event has been "posted", it will be handled by the
+ <p>
+ This receiver supports log files created using log4j's XMLLayout, as well as java.util.logging
+ XMLFormatter (via the org.apache.log4j.spi.Decoder interface).
+ <p>
+ By default, log4j's XMLLayout is supported (no need to specify a decoder in that case).
+ <p>
+ To configure this receiver to support java.util.logging's XMLFormatter, specify a 'decoder' param
+ of org.apache.log4j.xml.UtilLoggingXMLDecoder.
+ <p>
+ Once the event has been "posted", it will be handled by the
appenders currently configured in the LoggerRespository.
@author Mark Womack
@@ -81,6 +89,9 @@
return decoder;
}
+ /**
+ *Specify the class name implementing org.apache.log4j.spi.Decoder that can process the file.
+ */
public void setDecoder(String _decoder) {
decoder = _decoder;
}
diff --git a/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java b/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
index 28cc9d6..35e4c36 100644
--- a/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
+++ b/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
@@ -41,9 +41,9 @@
import org.apache.log4j.plugins.Receiver;
import org.apache.log4j.rule.ExpressionRule;
import org.apache.log4j.rule.Rule;
+import org.apache.log4j.spi.LocationInfo;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.spi.ThrowableInformation;
-import org.apache.log4j.spi.LocationInfo;
import org.apache.oro.text.perl.Perl5Util;
import org.apache.oro.text.regex.MalformedPatternException;
import org.apache.oro.text.regex.MatchResult;
@@ -63,7 +63,7 @@
* <p>
* <b>Features:</b><br>
* - specify the URL of the log file to be processed<br>
- * - specify the timestamp format in the file (if one exists)<br>
+ * - specify the timestamp format in the file (if one exists, using patterns from {@link java.text.SimpleDateFormat})<br>
* - specify the pattern (logFormat) used in the log file using keywords, a wildcard character (*) and fixed text<br>
* - 'tail' the file (allows the contents of the file to be continually read and new events processed)<br>
* - supports the parsing of multi-line messages and exceptions
@@ -303,7 +303,7 @@
}
/**
- * Mutator
+ * Mutator. Specify a pattern from {@link java.text.SimpleDateFormat}
*
* @param timestampFormat
*/