cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r368377 - /cocoon/blocks/cron/trunk/java/org/apache/cocoon/components/cron/CocoonPipelineCronJob.java
Date Thu, 12 Jan 2006 14:19:01 GMT
Author: cziegeler
Date: Thu Jan 12 06:18:56 2006
New Revision: 368377

URL: http://svn.apache.org/viewcvs?rev=368377&view=rev
Log:
Only append if logged

Modified:
    cocoon/blocks/cron/trunk/java/org/apache/cocoon/components/cron/CocoonPipelineCronJob.java

Modified: cocoon/blocks/cron/trunk/java/org/apache/cocoon/components/cron/CocoonPipelineCronJob.java
URL: http://svn.apache.org/viewcvs/cocoon/blocks/cron/trunk/java/org/apache/cocoon/components/cron/CocoonPipelineCronJob.java?rev=368377&r1=368376&r2=368377&view=diff
==============================================================================
--- cocoon/blocks/cron/trunk/java/org/apache/cocoon/components/cron/CocoonPipelineCronJob.java
(original)
+++ cocoon/blocks/cron/trunk/java/org/apache/cocoon/components/cron/CocoonPipelineCronJob.java
Thu Jan 12 06:18:56 2006
@@ -59,6 +59,7 @@
         InputStream is = null;
         InputStreamReader reader = null;
         try {
+            boolean append = getLogger().isInfoEnabled();
             resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE);
             src = resolver.resolveURI("cocoon://" + pipeline);
 
@@ -68,10 +69,12 @@
             char[] b = new char[8192];
             int n;
             while ((n = reader.read (b)) > 0) {
-                sb.append(b, 0, n);
+                if ( append ) {
+                    sb.append(b, 0, n);
+                }
             }
             reader.close();
-            if (getLogger().isInfoEnabled()) {
+            if (append) {
                 getLogger().info("CocoonPipelineCronJob: " + name + ", called pipeline: "
+
                                    pipeline + ", and received following content:\n" + sb.toString());
             }



Mime
View raw message