You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-cvs@jakarta.apache.org by ce...@apache.org on 2001/11/28 23:20:44 UTC
cvs commit: jakarta-log4j/src/java/org/apache/log4j/net JMSAppender.java JMSSink.java
ceki 01/11/28 14:20:44
Modified: docs HISTORY
src/java/org/apache/log4j/net JMSAppender.java JMSSink.java
Log:
Bug fix in JMSAppender
Revision Changes Path
1.74 +19 -15 jakarta-log4j/docs/HISTORY
Index: HISTORY
===================================================================
RCS file: /home/cvs/jakarta-log4j/docs/HISTORY,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- HISTORY 2001/11/18 22:10:35 1.73
+++ HISTORY 2001/11/28 22:20:44 1.74
@@ -33,15 +33,29 @@
extends Level to preserve backward compatibility. [*]
- The Logger class replaced the Category class. Category class now
- extends Logger to preserve backward compatibility. [*]
+ extends Logger to preserve backward compatibility. We proudly mark
+ this change with a single star for 100% compatibility. [*]
- The Category.assert method has been replaced by
- Category.assertLog. This change was mecessary because assert is a
- language reserved word in JDK 1.4. [**]
+ Category.assertLog. This change was necessary because assert is a
+ language reserved word in JDK 1.4. [*/**]
+ - Removed deprecated methods setOptions and getOptionStrings defined
+ in the org.apache.log4j.spi.OptionHandler interface. This interface
+ is implemented by most log4j appenders and layouts. In particular,
+ all appenders and layouts shipped with log4j contain these
+ deprecated methods. They have become totally redundant after we
+ moved to JavaBeans style configuration in log4j 1.1. [**]
+
+ - The disable(Level) methods in Hierarchy have been removed and been
+ replaced by threshold methods. [**]
+
- Added buffered IO capability to FileAppender and subclasses. [*]
+
+ - The location information (or stack information) was not correctly
+ transmitted by JMSAppender. [*]
- - Added event reporting capability to the Hierachy class.
+ - Added event reporting capability to the Hierarchy class.
- Added new system property "log4j.configuratorClass". This property
allows the user to specify the custom configurator at the default
@@ -51,22 +65,12 @@
erroneous and caused headaches. [*]
- Introduced the Mapped Diagnostic Context or MDC class. This class
- is similar to the NDC except that the diagnistic context is based
+ is similar to the NDC except that the diagnostic context is based
on a map instead of a stack. Moreover the MDC is automatically
inherited by child threads under JDK 1.2 and above. [*]
- Corrected a performance bug in the NDC class as observed by Dan
Milstein and independently by Ray Millard. [*]
-
- - Removed deprecated methods setOptions and getOptionStrings defined
- in the org.apache.log4j.spi.OptionHandler interface. This interface
- is implemented by most log4j appenders and layouts. In particular,
- all appenders and layouts shipped with log4j contain these
- deprecated methods. They have become totally redundant after we
- moved to JavaBeans style configuration in log4j 1.1. [**]
-
- - The disable(Level) methods in Hierarchy have been removed and been
- replaced by threshold methods. [**]
- Removed deprecated methods disable(Priority), disableAll,
disableDebug, disableInfo and enableAll in BasicConfigurator. [*]
1.12 +25 -1 jakarta-log4j/src/java/org/apache/log4j/net/JMSAppender.java
Index: JMSAppender.java
===================================================================
RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/JMSAppender.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- JMSAppender.java 2001/07/25 19:43:44 1.11
+++ JMSAppender.java 2001/11/28 22:20:44 1.12
@@ -3,7 +3,7 @@
*
* This software is published under the terms of the Apache Software
* License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.APL file. */
+ * distribution in the LICENSE.txt file. */
package org.apache.log4j.net;
@@ -33,6 +33,7 @@
TopicPublisher topicPublisher;
String topicBindingName;
String tcfBindingName;
+ boolean locationInfo;
public
JMSAppender() {
@@ -73,6 +74,16 @@
String getTopicBindingName() {
return topicBindingName;
}
+
+
+ /**
+ Returns value of the <b>LocationInfo</b> property which
+ determines whether location (stack) info is sent to the remote
+ subscriber. */
+ public
+ boolean getLocationInfo() {
+ return locationInfo;
+ }
public
void activateOptions() {
@@ -164,6 +175,9 @@
try {
ObjectMessage msg = topicSession.createObjectMessage();
+ if(locationInfo) {
+ event.getLocationInformation();
+ }
msg.setObject(event);
topicPublisher.publish(msg);
} catch(Exception e) {
@@ -171,6 +185,16 @@
ErrorCode.GENERIC_FAILURE);
}
}
+
+ /**
+ If true, the information sent to the remote subscriber will include
+ location information. By default no location information is sent
+ to the subscriber. */
+ public
+ void setLocationInfo(boolean locationInfo) {
+ this.locationInfo = locationInfo;
+ }
+
public
boolean requiresLayout() {
1.9 +1 -1 jakarta-log4j/src/java/org/apache/log4j/net/JMSSink.java
Index: JMSSink.java
===================================================================
RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/JMSSink.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- JMSSink.java 2001/09/10 22:20:29 1.8
+++ JMSSink.java 2001/11/28 22:20:44 1.9
@@ -3,7 +3,7 @@
*
* This software is published under the terms of the Apache Software
* License version 1.1, a copy of which has been included with this
- * distribution in the LICENSE.APL file. */
+ * distribution in the LICENSE.txt file. */
package org.apache.log4j.net;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>