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/10/17 08:37:30 UTC
cvs commit: jakarta-log4j/src/xdocs download.xml
ceki 01/10/16 23:37:30
Modified: . build.sh
build build.xml
docs HISTORY contactUs.html documentation.html
download.html earlier.html history.html index.html
src/docbook defaultInit.xml
src/xdocs download.xml
Log:
doc changes.
small changes to the build.xml file
Revision Changes Path
1.6 +1 -6 jakarta-log4j/build.sh
Index: build.sh
===================================================================
RCS file: /home/cvs/jakarta-log4j/build.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- build.sh 2001/09/27 21:24:48 1.5
+++ build.sh 2001/10/17 06:37:29 1.6
@@ -14,23 +14,18 @@
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar
fi
-# convert the existing path to unix
-if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
for l in build/lib/*.jar
do
echo "Adding $l to CLASSPATH."
CLASSPATH=${CLASSPATH}:$l
done
-
# convert the unix path to windows
if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi
+echo "--$CLASSPATH--"
BUILDFILE=build/build.xml
${JAVA_HOME}/bin/java -classpath ${CLASSPATH} \
1.54 +1 -1 jakarta-log4j/build/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-log4j/build/build.xml,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- build.xml 2001/10/01 21:16:37 1.53
+++ build.xml 2001/10/17 06:37:29 1.54
@@ -9,7 +9,7 @@
<!-- ================================================================= -->
<project name="log4j" default="usage" basedir=".." >
- <property name="version" value="1.2alpha1"/>
+ <property name="version" value="1.2alpha2"/>
<!-- The base directory relative to which most targets are built -->
<property name="base" value="."/>
1.70 +2 -2 jakarta-log4j/docs/HISTORY
Index: HISTORY
===================================================================
RCS file: /home/cvs/jakarta-log4j/docs/HISTORY,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -r1.69 -r1.70
--- HISTORY 2001/10/12 07:05:11 1.69
+++ HISTORY 2001/10/17 06:37:29 1.70
@@ -5,9 +5,9 @@
client code.
[***] Changes requiring important modifications to existing client code.
- October ??, 2001
+ ??, 2001
- - Release of version 1.2
+ - Release of version 1.2 (ALPHA)
- Improved error reporting in DOMConfigurator. Thanks to Thomas Tuft
Muller for contributing the enhancement. [*]
1.13 +4 -2 jakarta-log4j/docs/contactUs.html
Index: contactUs.html
===================================================================
RCS file: /home/cvs/jakarta-log4j/docs/contactUs.html,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- contactUs.html 2001/09/25 10:06:35 1.12
+++ contactUs.html 2001/10/17 06:37:29 1.13
@@ -36,7 +36,7 @@
<tr>
<!-- LEFT SIDE NAVIGATION -->
- <td width="20%" valign="top" nowrap="true">
+ <td valign="top" nowrap="true">
<p><strong>Log4j Project</strong></p>
<ul>
<li> <a href="./index.html">Introduction</a>
@@ -51,13 +51,14 @@
</li>
</ul>
</td>
- <td width="80%" align="left" valign="top">
+ <td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Bug reporting"><strong>Bug reporting</strong></a>
</font>
</td></tr>
+ <tr><td><br/></td></tr>
<tr><td>
<blockquote>
<p>Bugs should be reported by using the
@@ -79,6 +80,7 @@
<a name="Mailing lists"><strong>Mailing lists</strong></a>
</font>
</td></tr>
+ <tr><td><br/></td></tr>
<tr><td>
<blockquote>
<p>New releases and important bug-fixes are announced at the
1.17 +3 -2 jakarta-log4j/docs/documentation.html
Index: documentation.html
===================================================================
RCS file: /home/cvs/jakarta-log4j/docs/documentation.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- documentation.html 2001/09/26 08:37:42 1.16
+++ documentation.html 2001/10/17 06:37:29 1.17
@@ -36,7 +36,7 @@
<tr>
<!-- LEFT SIDE NAVIGATION -->
- <td width="20%" valign="top" nowrap="true">
+ <td valign="top" nowrap="true">
<p><strong>Log4j Project</strong></p>
<ul>
<li> <a href="./index.html">Introduction</a>
@@ -51,13 +51,14 @@
</li>
</ul>
</td>
- <td width="80%" align="left" valign="top">
+ <td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="log4j documentation"><strong>log4j documentation</strong></a>
</font>
</td></tr>
+ <tr><td><br/></td></tr>
<tr><td>
<blockquote>
<p>The following documentation is included with the standard log4j
1.38 +8 -5 jakarta-log4j/docs/download.html
Index: download.html
===================================================================
RCS file: /home/cvs/jakarta-log4j/docs/download.html,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- download.html 2001/09/26 10:42:08 1.37
+++ download.html 2001/10/17 06:37:29 1.38
@@ -36,7 +36,7 @@
<tr>
<!-- LEFT SIDE NAVIGATION -->
- <td width="20%" valign="top" nowrap="true">
+ <td valign="top" nowrap="true">
<p><strong>Log4j Project</strong></p>
<ul>
<li> <a href="./index.html">Introduction</a>
@@ -51,13 +51,14 @@
</li>
</ul>
</td>
- <td width="80%" align="left" valign="top">
+ <td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="log4j version 1.1.3"><strong>log4j version 1.1.3</strong></a>
</font>
</td></tr>
+ <tr><td><br/></td></tr>
<tr><td>
<blockquote>
<p>Download version 1.1.3 including <i>full source code</i>,
@@ -79,13 +80,14 @@
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
- <a name="log4j version 1.2 alpha1"><strong>log4j version 1.2 alpha1</strong></a>
+ <a name="log4j version 1.2 alpha2"><strong>log4j version 1.2 alpha2</strong></a>
</font>
</td></tr>
+ <tr><td><br/></td></tr>
<tr><td>
<blockquote>
- <p>An alpha version of log4j 1.2 is now available in in <a href="../jakarta-log4j-1.2alpha1.tar.gz"><b>TAR.GZ</b></a>
- format or in <a href="../jakarta-log4j-1.2alpha1.zip"><b>ZIP</b></a> format.
+ <p>An alpha version of log4j 1.2 is now available in in <a href="../jakarta-log4j-1.2alpha2.tar.gz"><b>TAR.GZ</b></a>
+ format or in <a href="../jakarta-log4j-1.2alpha2.zip"><b>ZIP</b></a> format.
</p>
<p>Log4j version 1.2 is still in alpha stage. It is not
feature-complete, still requries fair amount of testing, nor
@@ -107,6 +109,7 @@
<a name="Third-party software"><strong>Third-party software</strong></a>
</font>
</td></tr>
+ <tr><td><br/></td></tr>
<tr><td>
<blockquote>
<dl>
1.15 +3 -2 jakarta-log4j/docs/earlier.html
Index: earlier.html
===================================================================
RCS file: /home/cvs/jakarta-log4j/docs/earlier.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- earlier.html 2001/09/25 10:06:35 1.14
+++ earlier.html 2001/10/17 06:37:29 1.15
@@ -36,7 +36,7 @@
<tr>
<!-- LEFT SIDE NAVIGATION -->
- <td width="20%" valign="top" nowrap="true">
+ <td valign="top" nowrap="true">
<p><strong>Log4j Project</strong></p>
<ul>
<li> <a href="./index.html">Introduction</a>
@@ -51,13 +51,14 @@
</li>
</ul>
</td>
- <td width="80%" align="left" valign="top">
+ <td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Older distributions of the log4j package"><strong>Older distributions of the log4j package</strong></a>
</font>
</td></tr>
+ <tr><td><br/></td></tr>
<tr><td>
<blockquote>
<hr />
1.16 +3 -2 jakarta-log4j/docs/history.html
Index: history.html
===================================================================
RCS file: /home/cvs/jakarta-log4j/docs/history.html,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- history.html 2001/09/25 10:06:35 1.15
+++ history.html 2001/10/17 06:37:29 1.16
@@ -36,7 +36,7 @@
<tr>
<!-- LEFT SIDE NAVIGATION -->
- <td width="20%" valign="top" nowrap="true">
+ <td valign="top" nowrap="true">
<p><strong>Log4j Project</strong></p>
<ul>
<li> <a href="./index.html">Introduction</a>
@@ -51,13 +51,14 @@
</li>
</ul>
</td>
- <td width="80%" align="left" valign="top">
+ <td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Project history"><strong>Project history</strong></a>
</font>
</td></tr>
+ <tr><td><br/></td></tr>
<tr><td>
<blockquote>
<p>The <a href="HISTORY"><b>project history</b></a> gives a brief
1.15 +3 -2 jakarta-log4j/docs/index.html
Index: index.html
===================================================================
RCS file: /home/cvs/jakarta-log4j/docs/index.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- index.html 2001/09/25 10:06:35 1.14
+++ index.html 2001/10/17 06:37:29 1.15
@@ -36,7 +36,7 @@
<tr>
<!-- LEFT SIDE NAVIGATION -->
- <td width="20%" valign="top" nowrap="true">
+ <td valign="top" nowrap="true">
<p><strong>Log4j Project</strong></p>
<ul>
<li> <a href="./index.html">Introduction</a>
@@ -51,13 +51,14 @@
</li>
</ul>
</td>
- <td width="80%" align="left" valign="top">
+ <td align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Introduction"><strong>Introduction</strong></a>
</font>
</td></tr>
+ <tr><td><br/></td></tr>
<tr><td>
<blockquote>
<p>Inserting log statements into your code is a low-tech method for
1.5 +88 -41 jakarta-log4j/src/docbook/defaultInit.xml
Index: defaultInit.xml
===================================================================
RCS file: /home/cvs/jakarta-log4j/src/docbook/defaultInit.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- defaultInit.xml 2001/10/15 01:01:12 1.4
+++ defaultInit.xml 2001/10/17 06:37:29 1.5
@@ -106,8 +106,8 @@
highly recommend Jason Hunter's book entitled "Java Servlet
Programming" from O'Reilly & Associates.</para>
- <para>Although not explicitly stateed in the <ulink
- url="http://www.jcp.org/jsr/detail/53.jsp">Java Servlet 2.3 and
+ <para>Although not explicitly stated in the <ulink
+ url="http://www.jcp.org/jsr/detail/53.jsp">Java Servlet 2.3 and
JavaServer Pages 1.2 Specifications</ulink>, most web containers
will load the classes of a web-application in a separate
classloader. Moreover, per section SRV.3.7 of the specification,
@@ -124,17 +124,19 @@
the <filename>WEB-INF/lib</filename> directory. Moreover, per
section SRV.9.7.2, it is recommended classes packaged within the
WAR are loaded in preference to classes residing in container-wide
- library JARs. Tomcat, has a classloader hierarchy which makes its
- own utility classes invisible to web-applications.
+ library JARs. In particular, Tomcat 4.0 has a classloader
+ hierarchy which makes its own utility classes invisible to
+ web-applications.
</para>
- <para>Thus, in practice, placing
- <filename>log4j-version.jar</filename> in the
+ <para>Thus, in practice placing
+ <filename>log4j-VERSION.jar</filename> in the
<filename>WEB-INF/lib</filename> directory of your web-application
will cause log4j classes to be loaded/unloaded whenever your
web-application is loaded/unloaded. Moreover, each copy of the
- log4j classes will be treated as seperate unrelated copies by the
- JVM.
+ log4j classes will be treated as seperate unrelated copy by the
+ JVM. It follows that each of your web-applications can live in its
+ own log4j-logging universe.
</para>
@@ -168,10 +170,10 @@
the default configuration file. This file should be place
under the <filename>WEB-INF/classes</filename> directory of
your web-application. The file will be read using the <ulink
- url="../api/org/apache/log4j/xml/PropertyConfigurator.html">PropertyConfigurator</ulink>. Each
- web-application will use a different default configuration for
- the list of searched locations.file because each file is
- relative to a web-application.
+ url="../api/org/apache/log4j/xml/PropertyConfigurator.html">PropertyConfigurator</ulink>.
+ Each web-application will use a different default
+ configuration file because each file is relative to a
+ web-application.
</para>
</example>
@@ -189,7 +191,7 @@
configuration file. This file should be place under the
<filename>WEB-INF/classes</filename> directory of your
web-application. Since the file ends with a
- <filename>.xml</filename> extension, it will read using
+ <filename>.xml</filename> extension, it will be parsed using
the <ulink
url="../api/org/apache/log4j/xml/DOMConfigurator.html">DOMConfigurator</ulink>. Each
web-application will use a different default configuration
@@ -213,16 +215,17 @@
</para>
</example>
- <para>Different web-applications will load the log4j classes
- through their respective classloaderss. Thus, each image of
- the log4j environment will act independetly and without any
- mutual synchronization. For example, a
- <classname>FileAppender</classname> defined exactly the same
- way in multiple web-application configurations will all
- attempt to write the same file. The results are likely to be
- less than satisfactory. You must make sure that log4j
- configurations of different web-applications do not use the
- same underlying system resource.
+ <para>Different web-applications will load the log4j classes
+ through their respective classloaderss. Thus, each image of
+ the log4j environment will act independetly and without any
+ mutual synchronization. This can lead to dangerous
+ situations. For example, if different web-applications define
+ a <classname>FileAppender</classname> writing to an
+ absolute-path file will all write that file without any
+ mutual-synchronization. The results are likely to be less
+ than satisfactory. It is your responsibility to make sure that
+ log4j configurations of different web-applications do not use
+ the same underlying system resource.
</para>
<para>More generally, appenders should not be sharing the same
@@ -287,19 +290,44 @@
<param-value>WEB-INF/classes/log4j.lcf</param-value>
</init-param>
- <emphasis role="bold"><load-on-startup>1</load-on-startup></emphasis>
+ <emphasis role="strong"><load-on-startup>1</load-on-startup></emphasis>
</servlet>
</programlisting>
</para>
- <para>Writing an initialization servlet is the most flexible
- way for initializing log4j. There are no constraints on the
- classname you can place in the <classname>init()</classname>
+ <para>Writing an initialization servlet is the most flexible way
+ for initializing log4j as there are no constraints on the amount
+ of code you can place in the <classname>init()</classname>
method of the servlet.</para>
</sect1>
<sect1>
<title>Log4j Initilization in Application Servers</title>
+
+ <para>Log4j is known to work well under most Application Servers
+ altough you should be aware of the classical EJB restrictions. In
+ particular, your class-wide loggers should be final static. As in,
+ <programlisting>
+ public class SomeEJB extends EntityBean {
+
+ <emphasis role="strong">final static</emphasis> Logger logger = Logger.gerLogger(SomeEJB.class);
+ ...
+ }</programlisting>
+
+ </para>
+
+ <para>You sould also avoid using the
+ <classname>FileAppender</classname> because it writes directly
+ to a file. Although writing to files does not seem to cause
+ problems in most application servers, it is explicitly forbidden
+ by the EJB specfication. You should consider the
+ <classname>SocketAppender</classname> or
+ <classname>JMSAppedner</classname> instead. Similarly, avoid
+ using the <classname>AsyncAppender</classname> because it
+ creates a thread of its own which is forbidden by the EJB
+ specification.
+ </para>
+
<sect2>
<title>JBoss</title>
@@ -370,29 +398,48 @@
url="http://java.sun.com/products/jdk/1.2/docs/guide/extensions/spec.html">bundled
extensions</ulink> for jar files. A jar file can specify the
relative URLs of extensions and libraries that it requires via
- the the "Class-Path" manifest attribute.
+ the the "Class-Path" manifest attribute. Relative URLs ending
+ with '/' are assumed to refer to directories.
</para>
-
- An application (or, more generally, JAR file) specifies the
- relative URLs of the extensions (and libraries) that it needs
- via the manifest attribute Class-Path. This attribute lists
- the URLs to search for implementations of extensions (or other
- libraries) if they cannot be found as extensions installed on
- the host Java virtual machine. These relative URLs may include
- JAR files and directories for any libraries or resources
- needed by the application or extension. Relative URLs not
- ending with '/' are assumed to refer to JAR files. For
- example,
+ <para>For example, adding the line
+ <screen>Class-Path: lib/log4j-VERSION.jar lib/</screen>
+ to the manifest file of
+ your application's ear file or your EJB jar files will allow
+ log4j classes to be loaded from
+ <filename>lib/log4j-VERSION.jar</filename> relative to the ear
+ or jar file. Placing the file
+ <filename>log4j.properties</filename> in the
+ <filename>lib/</filename> will let log4j find the properties
+ configuration file and auto-initialize. You may also place an
+ XML file under <filename>lib/</filename> directory but this
+ will require you to set the <envar>log4j.configuration</envar>
+ system property.
+ </para>
+
</sect2>
<sect2>
<title>IBM Websphere</title>
- <para>I have no personal experience with IBM's Websphere.
-
+ <para>See the Chapter 13 of <ulink
+ url="http://www.redbooks.ibm.com/pubs/pdfs/redbooks/sg246134.pdf">IBM
+ Redbook "WebSphere Version 4 Application Development
+ Handbook"</ulink> for a discussion on using log4j under
+ WebSphere.
</para>
+
+ <warning>
+ <para> Though the Redbook is undoubtedly motivated by the most
+ noble intentions, I strongly discourage you from adopting its
+ intialization wrapper (<classname>LogHelper</classname>)
+ approach. The wrapper solution is highly intrusive and goes
+ against the "separation of usage and configuration principle"
+ so dear to log4j. This approach unfortunately continues to be
+ suggested by well-meaning log4j users.
+ </para>
+ </warning>
</sect2>
</sect1>
</chapter>
1.37 +3 -3 jakarta-log4j/src/xdocs/download.xml
Index: download.xml
===================================================================
RCS file: /home/cvs/jakarta-log4j/src/xdocs/download.xml,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- download.xml 2001/09/26 10:42:08 1.36
+++ download.xml 2001/10/17 06:37:29 1.37
@@ -57,11 +57,11 @@
</section>
- <section name="log4j version 1.2 alpha1">
+ <section name="log4j version 1.2 alpha2">
<p>An alpha version of log4j 1.2 is now available in in <a
- href="../jakarta-log4j-1.2alpha1.tar.gz"><b>TAR.GZ</b></a>
+ href="../jakarta-log4j-1.2alpha2.tar.gz"><b>TAR.GZ</b></a>
format or in <a
- href="../jakarta-log4j-1.2alpha1.zip"><b>ZIP</b></a> format.
+ href="../jakarta-log4j-1.2alpha2.zip"><b>ZIP</b></a> format.
</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-cvs-help@jakarta.apache.org