cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r153625 - cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java
Date Sun, 13 Feb 2005 12:13:40 GMT
Author: cziegeler
Date: Sun Feb 13 04:13:39 2005
New Revision: 153625

URL: http://svn.apache.org/viewcvs?view=rev&rev=153625
Log:
Calculate timeString only if required

Modified:
    cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java

Modified: cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java
URL: http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java?view=diff&r1=153624&r2=153625
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/servlet/CocoonServlet.java Sun Feb 13 04:13:39
2005
@@ -1001,8 +1001,9 @@
             }
 
             long end = System.currentTimeMillis();
-            String timeString = processTime(end - start);
+            String timeString = null;
             if (getLogger().isInfoEnabled()) {
+                timeString = processTime(end - start);
                 getLogger().info("'" + uri + "' " + timeString);
             }
 
@@ -1013,6 +1014,9 @@
                     show = !showTime.equalsIgnoreCase("no");
                 }
                 if (show) {
+                    if ( timeString == null ) {
+                        timeString = processTime(end - start);                        
+                    }
                     boolean hide = this.settings.isHideShowTime();
                     if (showTime != null) {
                         hide = showTime.equalsIgnoreCase("hide");



Mime
View raw message