ceki 2005/01/20 07:07:24 Modified: src/java/org/apache/log4j/joran/action SubstitutionPropertyAction.java examples/tiny-webapp/Tata/WebRoot/WEB-INF/classes tata-log4j.xml src/xdocs download.xml examples/tiny-webapp INSTALL.txt Log: Doc enhacements or cosmetic chages Revision Changes Path 1.3 +4 -3 logging-log4j/src/java/org/apache/log4j/joran/action/SubstitutionPropertyAction.java Index: SubstitutionPropertyAction.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/joran/action/SubstitutionPropertyAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SubstitutionPropertyAction.java 12 Jan 2005 15:04:18 -0000 1.2 +++ SubstitutionPropertyAction.java 20 Jan 2005 15:07:24 -0000 1.3 @@ -22,10 +22,11 @@ /** - * This action set new substitution property for the execution context by name, - * value pair, or adds all the properties found in the specified file. + * This action sets new substitution properties for the execution context by + * name, value pair, or adds all the properties passed in the [EMAIL PROTECTED] Properties} + * argument. * - * @author Ceki Gülcü + * @author <a href="http://www.qos.ch/log4j/">Ceki Gülcü</a> */ public class SubstitutionPropertyAction extends PropertyAction { 1.2 +3 -5 logging-log4j/examples/tiny-webapp/Tata/WebRoot/WEB-INF/classes/tata-log4j.xml Index: tata-log4j.xml =================================================================== RCS file: /home/cvs/logging-log4j/examples/tiny-webapp/Tata/WebRoot/WEB-INF/classes/tata-log4j.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tata-log4j.xml 19 Jan 2005 17:33:38 -0000 1.1 +++ tata-log4j.xml 20 Jan 2005 15:07:24 -0000 1.2 @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE log4j:configuration > +<!DOCTYPE configuration > - -<log4j:configuration debug="true" xmlns:log4j='http://jakarta.apache.org/log4j/'> +<configuration debug="true" xmlns='http://logging.apache.org/'> <appender name="FILE" class="org.apache.log4j.FileAppender"> <param name="File" value="/tata.log"/> @@ -12,9 +11,8 @@ </layout> </appender> - <root> <level value="debug"/> <appender-ref ref="FILE" /> </root> -</log4j:configuration> +</configuration> 1.80 +1 -15 logging-log4j/src/xdocs/download.xml Index: download.xml =================================================================== RCS file: /home/cvs/logging-log4j/src/xdocs/download.xml,v retrieving revision 1.79 retrieving revision 1.80 diff -u -r1.79 -r1.80 --- download.xml 29 Nov 2004 18:46:14 -0000 1.79 +++ download.xml 20 Jan 2005 15:07:24 -0000 1.80 @@ -141,22 +141,8 @@ logging. </dd> - <!-- ============================================================================== --> - - <dt><a href="http://cvs.apache.org/viewcvs/jakarta-log4j/log4jMini/"><b>log4j<em>ME</em></b></a></dt> - <dd>Log4j<em>ME</em>, or log4j MiniEdition, is based on the - same code as log4j. However, as the name indicates the - mini-edition is much smaller. It offers the same client - interface such that code compiled for log4jME is 100% - compatible with log4j standard edition. You can choose to - upgrade to log4j standard edition at any time by replacing - <em>log4jME.jar</em> with <em>log4j.jar</em> in your - classpath. At this time, log4jME is only available through - CVS. - </dd> - - <!-- ============================================================================== --> + <!-- ============================================================================== --> <dt><a href="http://www.openfuture.de/Log4Unit/"><b>log4<em>Unit</em></b></a></dt> 1.6 +27 -0 logging-log4j/examples/tiny-webapp/INSTALL.txt Index: INSTALL.txt =================================================================== RCS file: /home/cvs/logging-log4j/examples/tiny-webapp/INSTALL.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- INSTALL.txt 19 Jan 2005 17:33:38 -0000 1.5 +++ INSTALL.txt 20 Jan 2005 15:07:24 -0000 1.6 @@ -107,3 +107,30 @@ <display-name>Hello sample web-application</display-name> + +CAVEAT +====== + +We recommend that you name configuration resources uniquely. In +particualar, avoid naming the log4j configuration resource as +'log4j.xml' or as 'log4j.properties' for a non-default logger +repository. For example, the following env-entry is error prone: + +<env-entry> + <description>URL for configuring log4j context</description> + <env-entry-name>log4j/configuration-resource</env-entry-name> + <env-entry-value>log4j.xml</env-entry-value> + <env-entry-type>java.lang.String</env-entry-type> +</env-entry> + +While trying to configure the web-application log4j would search for +the resource 'log4j.xml' using the thread context classloader. Thus, +it would first attempt to locate 'log4j.xml' file using the +classloader specific to the web-application. However, if the file +'log4j.xml' did not exist there (we forgot to put a custom one in +WEB-INF/classes), and if the file 'log4j.xml' existed higher up in the +classloader tree, we could end up in a situation where the logger +repository for your web-application would be configured using the same +file as that used to configure the default repository. Such +involuntary sharing of the same configuration by multiple repositories +will result in corrupt log output.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]