Index: src/java/org/apache/log4j/Level.java
===================================================================
RCS file: /home/cvspublic/logging-log4j/src/java/org/apache/log4j/Level.java,v
retrieving revision 1.15
diff -b -B -U8 -r1.15 Level.java
--- src/java/org/apache/log4j/Level.java 1 Dec 2004 07:58:08 -0000 1.15
+++ src/java/org/apache/log4j/Level.java 5 May 2005 12:43:37 -0000
@@ -26,17 +26,20 @@
TRACE
, and ALL
.
The Level
class may be subclassed to define a larger
level set.
@author Ceki Gülcü
@author Yoav Shapira
*/
-public class Level {
+public class Level implements java.io.Serializable {
+
+ static final long serialVersionUID = -2641103705982732015L;
+
/**
* OFF level integer value.
*/
public static final int OFF_INT = Integer.MAX_VALUE;
/**
* FATAL level integer value.
*/
@@ -326,11 +329,20 @@
}
if (s.equals("OFF")) {
return OFF;
}
return defaultLevel;
}
+
+ /**
+ * Custom subclasses of Level may wish to implement their own
+ * readResolve
class.
+ */
+ private Object readResolve() {
+ return toLevel(this.level, this);
+ }
+
}
// End of class: Level.java