ceki 01/06/17 01:10:07 Modified: docs critique.html Log: More cosmetic changes. Revision Changes Path 1.8 +16 -15 jakarta-log4j/docs/critique.html Index: critique.html =================================================================== RCS file: /home/cvs/jakarta-log4j/docs/critique.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- critique.html 2001/06/17 07:38:35 1.7 +++ critique.html 2001/06/17 08:10:06 1.8 @@ -166,6 +166,8 @@ can only configure one instance of a given handler class. <em>This means that you can log to just one file at a time.</em> +<h2>Other differences</h2> + <p>There are many other details in which log4j differs from JSR47. Even if the log4j core is small, the project contains a total of over 30'000 lines of well-tested code. JSR47 contains about 5'000 @@ -178,8 +180,8 @@ Python. Companies are also offering commercial products extending log4j. -<p>Here is a short list of opensource projects that are known to use -log4j. +<p>Here is a short list of opensource projects or sites that are known +to use log4j. <ul> <li><a href="http://www.jcorporate.com/html/products/expresso/logging.html">Espresso Framework</a> @@ -187,7 +189,7 @@ <li><a href="http://java.freehep.org">FreeHEP</a> <li><a href="http://www.jboss.org">JBoss</a> -<li><a href="http://www.opensymphony.com/guidelines/logging.jsp">OpenSymphony (OSCache, SiteMesh, ...)</a> +<li><a href="http://www.opensymphony.com/guidelines/logging.jsp">OpenSymphony</a> <li><a href="http://theserverside.com">TheServerSide</a> <li><a href="http://jakarta.apache.org/turbine/index.html">Turbine</a> <li><a href="http://jakarta.apache.org/velocity/index.html">Velocity</a> @@ -258,13 +260,11 @@ <h2>Performance</h2> -<p>This is a widely misunderstood topic, even by experts. In log4j, -performance must be studied in three distinct cases: when logging is -turned off, when turned on but due to the comparison of the log -statement priority and category priority not enabled, and when -actually logging. Please refer to the <a +<p>Logging performance must be studied in three distinct cases: when +logging is turned off, when turned on but due to priority comparison +logic not enabled, and when actually logging. Please refer to the <a href="manual.html#performance">log4j manual</a> for a more detailed -discussion of log4j performance. +discussion of logging performance. <p>When logging is turned on, log4j will be about three times slower to decide whether a log statement is enabled or not. This is due to @@ -272,19 +272,20 @@ hierarchy. To give you an idea about the figures involved, we are talking about 90 <em>nanoseconds</em> instead of 30 <em>nanoseconds</em> on a 800Mhz Intel processor. In other words, one -million log statements will cost under a second in both environments. +million disabled logging requests will cost under a second in both +environments. -<p>When log4j logging is turned off entirely, walking the hierarchy is -not necessary. In this case, log4j will perform as well as JSR47. +<p>Having said that, logging statements should never be placed in +tight loops, for example, before or after an element swap instruction +in a sort algorithm. In common cases, the cost of parameter +construction before invoking a logging statement will overwhelm any +other performance consideration. <p>In log4j, caller localization information is optional whereas in JSR47 it is always extracted. Since the extraction of caller localization is a very slow operation, in the common case where caller information is not needed, log4j will log the same information 4 to 100 times faster. - -</ol> - <h2>Lobby Sun</h2> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]