diff --git a/xdocs/guide.xml b/xdocs/guide.xml index 7d143b9..cddfcbd 100644 --- a/xdocs/guide.xml +++ b/xdocs/guide.xml @@ -41,7 +41,13 @@ -
To use the JCL SPI from a Java class, include the following import statements: @@ -287,6 +294,8 @@ may end up invoked with different thread-context-classloader values set then the member must not be declared static. The use of "static" should therefore be avoided in code within any "library" type project.
+
Messages are logged to a logger, such as log
by invoking a method corresponding to priority.
@@ -327,6 +336,27 @@ In addition to the logging methods, the following are provided for code guards:
log.isTraceEnabled();
+
Prior to release 1.0.4, none of the standard Log implementations were + Serializable. If you are using such a release and have a Serializable classe + with a member that is of type Log then it is necessary to declare + that member to be transient and to ensure that the value is restored on + deserialization. The recommended approach is to define a custom + readObject method on the class which reinitializes that member.
+In release 1.0.4, all standard Log implementations are Serializable. This + means that class members of type Log do not need to be declared transient; + on deserialization the Log object will "rebind" to the same category for the + same logging library. Note that the same underlying logging library will be + used on deserialization as was used in the original object, even if the + application the object was deserialized into is using a different logging + library. There is one exception; LogKitLogger (adapter for the Avalon LogKit + library) is not Serializable for technical reasons.
+Custom Log implementations not distributed with commons-logging may + or may not be Serializable. If you wish your code to be compatible with + any arbitrary log adapter then you should follow the advice given above + for pre-1.0.4 releases.
+