From 25e2f3796aa30a34d6231c4448968d903dde75b9 Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Fri, 7 Aug 2009 18:05:57 +0000 Subject: 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. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@802116 13f79535-47bb-0310-9956-ffa450edef68 --- java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'java') diff --git a/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java b/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java index 7a045fdb9a..df8dd0b85b 100644 --- a/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java +++ b/java/systests/src/main/java/org/apache/qpid/util/LogMonitor.java @@ -172,9 +172,7 @@ public class LogMonitor */ 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 @@ public class LogMonitor * 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() { -- cgit v1.2.1