jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mets...@apache.org
Subject svn commit: r1491192 - in /incubator/jspwiki/trunk: ChangeLog jspwiki-war/src/main/java/org/apache/wiki/Release.java jspwiki-war/src/main/java/org/apache/wiki/util/WikiBackgroundThread.java jspwiki-war/src/test/java/org/apache/wiki/HsqlDbUtils.java
Date Sun, 09 Jun 2013 12:19:46 GMT
Author: metskem
Date: Sun Jun  9 12:19:45 2013
New Revision: 1491192

URL: http://svn.apache.org/r1491192
Log:
2013-06-09  Harry Metske (metskem@apache.org)

       * 2.10.0-svn-9

       * minor tweaks to HsqlDbUtils so we get far less debug output on builds (450k =>
90k)
       * WikiBackgroundThread: replace "System.out.println" with log4j error/warn

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/util/WikiBackgroundThread.java
    incubator/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/HsqlDbUtils.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1491192&r1=1491191&r2=1491192&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sun Jun  9 12:19:45 2013
@@ -1,3 +1,10 @@
+2013-06-09  Harry Metske (metskem@apache.org)
+
+       * 2.10.0-svn-9
+
+       * minor tweaks to HsqlDbUtils so we get far less debug output on builds (450k =>
90k)
+       * WikiBackgroundThread: replace "System.out.println" with log4j error/warn
+
 2013-06-07  Juan Pablo Santos (juanpablo AT apache DOT org)
 
        * 2.10.0-svn-8

Modified: incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java?rev=1491192&r1=1491191&r2=1491192&view=diff
==============================================================================
--- incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/Release.java Sun Jun
 9 12:19:45 2013
@@ -75,7 +75,7 @@ public final class Release
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "8";
+    public static final String     BUILD         = "9";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/util/WikiBackgroundThread.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/util/WikiBackgroundThread.java?rev=1491192&r1=1491191&r2=1491192&view=diff
==============================================================================
--- incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/util/WikiBackgroundThread.java
(original)
+++ incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/util/WikiBackgroundThread.java
Sun Jun  9 12:19:45 2013
@@ -18,6 +18,7 @@
  */
 package org.apache.wiki.util;
 
+import org.apache.log4j.Logger;
 import org.apache.wiki.InternalWikiException;
 import org.apache.wiki.WikiEngine;
 import org.apache.wiki.event.WikiEngineEvent;
@@ -35,6 +36,7 @@ import org.apache.wiki.event.WikiEventLi
  */
 public abstract class WikiBackgroundThread extends Thread implements WikiEventListener
 {
+    private static final Logger LOG = Logger.getLogger(WikiBackgroundThread.class);
     private volatile boolean m_killMe = false;
     private final WikiEngine m_engine;
     private final int m_interval;
@@ -71,7 +73,7 @@ public abstract class WikiBackgroundThre
         {
             if ( ((WikiEngineEvent)event).getType() == WikiEngineEvent.SHUTDOWN )
             {
-                System.out.println( "Detected wiki engine shutdown: killing " + getName()
+ "." );
+                LOG.warn( "Detected wiki engine shutdown: killing " + getName() + "." );
                 m_killMe = true;
             }
         }
@@ -125,7 +127,7 @@ public abstract class WikiBackgroundThre
         {
             // Perform the initial startup task
             final String name = getName();
-            System.out.println( "Starting up background thread: " + name + ".");
+            LOG.warn( "Starting up background thread: " + name + ".");
             startupTask();
             
             // Perform the background task; check every
@@ -147,7 +149,7 @@ public abstract class WikiBackgroundThre
                         if( m_killMe )
                         {
                             interrupted = true;
-                            System.out.println( "Interrupted background thread: " + name
+ "." );
+                            LOG.warn( "Interrupted background thread: " + name + "." );
                             break;
                         }
                     }
@@ -158,8 +160,7 @@ public abstract class WikiBackgroundThre
                 }
                 catch( Throwable t ) 
                 {
-                    System.err.println( "Background thread error: (stack trace follows)"
);
-                    t.printStackTrace();
+                    LOG.error( "Background thread error: (stack trace follows)", t );
                 }
             }
             
@@ -168,8 +169,7 @@ public abstract class WikiBackgroundThre
         }
         catch( Throwable t )
         {
-            System.err.println( "Background thread error: (stack trace follows)" );
-            t.printStackTrace();
+            LOG.error( "Background thread error: (stack trace follows)", t );
             throw new InternalWikiException( t.getMessage() );
         }
     }

Modified: incubator/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/HsqlDbUtils.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/HsqlDbUtils.java?rev=1491192&r1=1491191&r2=1491192&view=diff
==============================================================================
--- incubator/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/HsqlDbUtils.java (original)
+++ incubator/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/HsqlDbUtils.java Sun
Jun  9 12:19:45 2013
@@ -93,6 +93,8 @@ public class HsqlDbUtils
         Properties hProps = loadPropertiesFrom( "target/test-classes/jdbc.properties" );
         
         hsqlServer = new Server();
+        hsqlServer.setSilent(true);   // be quiet during junit tests
+        hsqlServer.setLogWriter(null);  // and even more quiet
         // pre-checks
         hsqlServer.checkRunning( false ); // throws RuntimeException if running
         



Mime
View raw message