You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2009/08/07 20:05:57 UTC

svn commit: r802116 - /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java

Author: ritchiem
Date: Fri Aug  7 18:05:57 2009
New Revision: 802116

URL: http://svn.apache.org/viewvc?rev=802116&view=rev
Log:
Update to LogMonitor to use channel truncation as the AlertingTest did previously. The current method can result in data log data loss and test failures.

Modified:
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java

Modified: qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java?rev=802116&r1=802115&r2=802116&view=diff
==============================================================================
--- qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java (original)
+++ qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java Fri Aug  7 18:05:57 2009
@@ -172,9 +172,7 @@
      */
     public void reset() throws FileNotFoundException, IOException
     {
-        OutputStreamWriter writer = new OutputStreamWriter(new FileOutputStream(_logfile));
-        writer.write("Log Monitor Reset\n");
-        writer.close();
+        new FileOutputStream(_logfile).getChannel().truncate(0);
     }
 
     /**
@@ -183,7 +181,7 @@
      * This is required to be called incase we added a new logger.
      *
      * If we don't call close then the new logger will continue to get log entries
-     * after our desired test has finished. 
+     * after our desired test has finished.
      */
     public void close()
     {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org