ceki 01/06/27 09:02:43 Modified: docs TROUBLESHOOT.html critique.html src/java/org/apache/log4j/test FQCNTest.java src/java/org/apache/log4j/xml/examples XCategory.java Log: - Added a section to docs/TROUBLESHOOT.html on caller localization info from sublcasses. - Modified docs Revision Changes Path 1.9 +24 -7 jakarta-log4j/docs/TROUBLESHOOT.html Index: TROUBLESHOOT.html =================================================================== RCS file: /home/cvs/jakarta-log4j/docs/TROUBLESHOOT.html,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- TROUBLESHOOT.html 2001/05/18 09:58:20 1.8 +++ TROUBLESHOOT.html 2001/06/27 16:02:40 1.9 @@ -22,7 +22,8 @@ <li><p><a href=#space>Options are not parsed correctly.</a> -<li><p><a href=#jit>Location information is printed as a "?" character.</a> +<li><p><a href=#jit>Caller location information is printed as a "?" +character.</a> <li><p><a href=#cce>ClassCastException when instantiating a Category subclasses.</a> @@ -96,13 +97,9 @@ the options might not be interpreted correctly due to trailing spaces. -<p>In log4j version 0.9.0, all spaces are removed from <em>both</em> -ends of option values. In version 0.9.1 log4j reverted to the old -behavior where option values are not all automatically trimmed. +<p><a name=jit><h3>Caller location information is printed as a "?" +character.</h3> - -<p><a name=jit><h3>Location information is printed as a "?" character.</h3> - Location information is extracted automatically by the PatternLayout conversion patterns %C, %F, %M and %L. However, some just-in-time (JIT) compilers make it impossible to extract location information. It @@ -112,6 +109,26 @@ <p>You can remedy this problem by disabling the JIT compiler and by compiling the code without the -O option. + +<p><b>In wrappers or subclasses of Category </b> + +<p>Wrappers or subclasses of <code>Category</code> need supply their +fully qualified class name to the <code>Category.log</code> method or +to <code>Category.forcedLog</code> methods so that the caller location +information can be extracted correctly. + +<p>This approach will work correctly in all cases except if the class +invoking the extended category instance has the same prefix as the +extended category class. For example, calling an instance of +<code>com.foo.BarCategory</code> from the +<code>com.foo.BarCategoryTest</code> class will not yield the correct +caller information. To circumvent this "bug", either perform the tests +from a class with a different name or add a dot to the fully qualified +name of the extending class that you supply to +<code>Category.log</code> to <code>Category.forcedLog</code> +methods. For the <code>com.foo.BarCategory</code> example, supply the +string <code>"com.foo.BarCategory."</code>. + <p><a name=cce><h3><code>ClassCastException</code> when instantiating a <code>Category</code> subclasses.</a></h3> 1.14 +49 -18 jakarta-log4j/docs/critique.html Index: critique.html =================================================================== RCS file: /home/cvs/jakarta-log4j/docs/critique.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- critique.html 2001/06/21 05:19:43 1.13 +++ critique.html 2001/06/27 16:02:40 1.14 @@ -181,6 +181,7 @@ to use log4j. <ul> +<li><a href="http://www.cryptix.org/products/sasl/">Cryptix</a> <li><a href="http://www.jcorporate.com/html/products/expresso/logging.html">Expresso Framework</a> <li><a href="http://www.free-project.org/">Free E-Democracy Project</a> <li><a href="http://java.freehep.org">FreeHEP</a> @@ -222,10 +223,14 @@ at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) </pre> - <p>Jochen Hiller had observed this problem in early 2001 when he implemented the JSR47 API by wrapping log4j. +<p>Note that any third-party implementation using the +<code>java.*</code> or <code>javax.*</code> namespaces violates Sun's +trademark on Java. Without explicit permission from Sun, such software +remains under the threat of litigation. + <h2>Error Handling</h2> In JSR 47 when an error occurs then either a @@ -305,10 +310,9 @@ Microsystems. <em>The address of the JSR47 experts group mailing list is considered confidential information.</em> I do not know it myself. -<p>Well over one hundred individuals, including some from very large -accounts, have written to Sun to express their concern, in their vast -majority pushing for the adoption of log4j. Their names and the -content of their request are listed below. I am very grateful for +<p>Many individuals have written to Sun to express their concern, in +their vast majority pushing for the adoption of log4j. Their names and +the content of their request are listed below. I am very grateful for their support. Some of these requests are quite detailed and insightful. @@ -352,7 +356,7 @@ <li><p><a href="pub-support/HenryLi.html">Henry Li</a> <!-- --> <li><p><a href="pub-support/RichardWilliams.html">Richard Williams </a> <!-- --> <li><p><a href="pub-support/JasonHeirtzler.html">Jason Heirtzler</a> <!-- --> -<li><p><a href="pub-support/ScottMiller.html">Scott Miller</a> +<li><p><a href="pub-support/ScottMiller.html">Scott Miller</a> <!-- --> <li><p><a href="pub-support/ChandraPatni.html">Chandra Patni</a> <!-- --> <li><p><a href="pub-support/DanielHoppe.html">Daniel Hoppe </a> <!-- --> <li><p><a href="pub-support/SebastienGuimont.html">Sebastien Guimont</a> <!-- --> @@ -370,7 +374,7 @@ <li><p><a href="pub-support/EmilyBache.html">Emily Bache</a> and her <a href="pub-support/EmilyBache2.html">follow up</a> <!-- --> <li><p><a href="pub-support/JulienDubois.html">Julien Dubois</a> <!-- --> <li><p><a href="pub-support/AlefArendsen.html">Alef Arendsen</a> <!-- --> -<li><p><a href="pub-support/SorenHilmer.html">Søren Hilmer</a> +<li><p><a href="pub-support/SorenHilmer.html">Søren Hilmer</a> <!-- --> <li><p><a href="pub-support/MaheshBhat.html">Mahesh Bhat</a> <!-- --> <li><p><a href="pub-support/JeffLinwood.html">Jeff Linwood</a> <li><p><a href="pub-support/PeterMeulmeester.html">Peter Meulmeester</a> <!-- --> @@ -419,32 +423,59 @@ <li><p><a href="pub-support/EdHowland.html">Ed Howland</a> <!-- --> <li><p><a href="pub-support/FredericSoulier.html">Frederic Soulier</a> <!-- --> <li><p><a href="pub-support/NathanQuinlan.html">Nathan Quinlan</a> <!-- --> -<li><p><a href="pub-support/LaurentCornelis.html">Laurent Cornelis</a> +<li><p><a href="pub-support/LaurentCornelis.html">Laurent Cornelis</a> <!-- --> <li><p><a href="pub-support/RomainGuy.html">Romain Guy</a> <!-- --> <li><p><a href="pub-support/OliverBurn.html">Oliver Burn</a> <!-- --> -<li><p><a href="pub-support/JonathanKeatley.html">Jonathan C. Keatley</a> +<li><p><a href="pub-support/JonathanKeatley.html">Jonathan C. Keatley</a> <!-- --> <li><p><a href="pub-support/YannickMenager.html">Yannick Menager</a> <!-- --> -<li><p><a href="pub-support/JeromeLacoste.html">Jérôme Lacoste</a> +<li><p><a href="pub-support/JeromeLacoste.html">Jérôme Lacoste</a> <!-- --> <li><p><a href="pub-support/FabienModoux.html">Fabien Modoux</a> <!-- --> <li><p><a href="pub-support/YuriyYatsyk.html">Yuriy Yatsyk</a> <!-- --> -<li><p><a href="pub-support/AndreCusson.html">Andre Cusson</a> +<li><p><a href="pub-support/AndreCusson.html">Andre Cusson</a> <!-- --> <li><p><a href="pub-support/RahulBhargava.html">Rahul Bhargava</a> +<li><p><a href="pub-support/WieserDaniel.html">Wieser Daniel</a> <!-- --> +<li><p><a href="pub-support/FrancescoMondora.html">Francesco Mondora</a> <!-- --> +<li><p><a href="pub-support/PaulAustin.html">Paul Austin</a> <!-- --> +<li><p><a href="pub-support/MichaelWeisser.html">Michael Weisser</a> <!-- --> +<li><p><a href="pub-support/MalcolmSparks.html">Malcolm Sparks</a> <!-- --> +<li><p><a href="pub-support/ThomasBohmbach.html">Thomas Bohmbach</a> <!-- --> +<li><p><a href="pub-support/AhmedSako.html">Ahmed Sako</a> <!-- --> +<li><p><a href="pub-support/HaraldPehl.html">Harald Pehl</a> <!-- --> +<li><p><a href="pub-support/AndreAnneck.html">Andre Anneck</a> <!-- --> +<li><p><a href="pub-support/NisolFabien.html">Nisol Fabien</a> <!-- --> +<li><p><a href="pub-support/PaulBook.html">Paul Book</a> <!-- --> +<li><p><a href="pub-support/AlexisAgahi.html">Alexis Agahi</a> +<!-- <li><p><a href="pub-support/PaulFurbacher.html">Paul Furbacher</a> --> +<li><p><a href="pub-support/SanfordRedlich.html">Sanford Redlich</a> <!-- --> +<li><p><a href="pub-support/MattSponer.html">Matt Sponer</a> <!-- --> +<li><p><a href="pub-support/DanielSeltzer.html">Daniel Seltzer</a> <!-- --> +<li><p><a href="pub-support/FlorinManolache.html">Florin Manolache</a> <!-- --> +<li><p><a href="pub-support/GeertPoels.html">Geert Poels</a> <!-- --> +<li><p><a href="pub-support/LeifHanack.html">Leif Hanack</a> +<li><p><a href="pub-support/AdamMenkes.html">Adam L. Menkes</a> <!-- --> +<li><p><a href="pub-support/Jean-MarcTupin.html">Jean-Marc Tupin</a> <!-- --> +<li><p><a href="pub-support/TonyCulshaw.html">Tony Culshaw</a> <!-- --> +<li><p><a href="pub-support/BartoszDudzinski.html">Bartosz Dudzinski</a> +<li><p><a href="pub-support/SabyMaxime.html">Saby Maxime</a> +<li><p><a href="pub-support/MeirFaraj.html">Meir Faraj</a> +<li><p><a href="pub-support/RobWalker.html">Rob Walker</a> <!-- --> +<li><p><a href="pub-support/LorrinNelson.html">Lorrin Nelson</a> +<li><p><a href="pub-support/ChristopherCooper.html">Christopher J. Cooper</a> <!-- --> +<li><p><a href="pub-support/LarsGregori.html">Lars Gregori</a> <!-- --> +<li><p><a href="pub-support/VieridelBianco.html">Vieri del Bianco</a> <!-- --> +<li><p><a href="pub-support/PatrickOHara.html">Patrick O'Hara</a> <!-- --> +<li><p><a href="pub-support/RobertQuinn.html">Robert Quinn</a> <!-- + + <li><p><a href="pub-support/.html"></a> <li><p><a href="pub-support/.html"></a> <li><p><a href="pub-support/.html"></a> <li><p><a href="pub-support/.html"></a> <li><p><a href="pub-support/.html"></a> <li><p><a href="pub-support/.html"></a> -<li><p><a href="pub-support/.html"></a> -<li><p><a href="pub-support/.html"></a> -<li><p><a href="pub-support/.html"></a> -<li><p><a href="pub-support/.html"></a> -<li><p><a href="pub-support/.html"></a> -<li><p><a href="pub-support/.html"></a> - --> 1.2 +0 -1 jakarta-log4j/src/java/org/apache/log4j/test/FQCNTest.java Index: FQCNTest.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/test/FQCNTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- FQCNTest.java 2001/06/26 19:53:38 1.1 +++ FQCNTest.java 2001/06/27 16:02:41 1.2 @@ -80,7 +80,6 @@ super.log(FQCN, Priority.DEBUG, message, null); } - protected String getFQCN() { return X1Category.FQCN; 1.13 +1 -1 jakarta-log4j/src/java/org/apache/log4j/xml/examples/XCategory.java Index: XCategory.java =================================================================== RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/xml/examples/XCategory.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- XCategory.java 2001/06/26 19:40:18 1.12 +++ XCategory.java 2001/06/27 16:02:43 1.13 @@ -37,7 +37,7 @@ // It's usually a good idea to add a dot suffix to the fully // qualified class name. This makes caller localization to work // properly even from classes that have almost the same fully - // qualified class name as XCategory. + // qualified class name as XCategory, such as XCategoryTest. private static String FQCN = XCategory.class.getName() + "."; // It's enough to instantiate a factory once and for all. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]