diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2008-06-13 11:44:47 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2008-06-13 11:44:47 +0000 |
commit | 6c7d2c450770c6dddbdd03f88da388189b1bb16a (patch) | |
tree | 50af544e7479c399ae4e7276e2bba39a98c85e50 /qadevOOo | |
parent | 7bff4451ff648d980f3718e79f214069d92c7727 (diff) |
INTEGRATION: CWS qadev32 (1.3.2); FILE MERGED
2008/04/17 11:40:27 cn 1.3.2.2: RESYNC: (1.3-1.4); FILE MERGED
2008/04/17 09:26:47 cn 1.3.2.1: #i87389# enhance logging
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/runner/helper/LoggingThread.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/qadevOOo/runner/helper/LoggingThread.java b/qadevOOo/runner/helper/LoggingThread.java index 5acadd0b6..3dc8802f0 100644 --- a/qadevOOo/runner/helper/LoggingThread.java +++ b/qadevOOo/runner/helper/LoggingThread.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: LoggingThread.java,v $ - * $Revision: 1.4 $ + * $Revision: 1.5 $ * * This file is part of OpenOffice.org. * @@ -33,6 +33,7 @@ package helper; import share.*; import lib.TestParameters; import util.PropertyName; +import util.utils; /** * This class is printing to a <CODE>LogWriter</CODE>. This could be usefull if a UNO-API @@ -50,6 +51,7 @@ public class LoggingThread extends Thread { TestParameters param; LogWriter log = null; boolean finished = false; + boolean debug = false; /** * @@ -59,16 +61,17 @@ public class LoggingThread extends Thread { public LoggingThread(LogWriter log, TestParameters tParam) { this.log = log; this.param = tParam; + this.debug = tParam.getBool(PropertyName.DEBUG_IS_ACTIVE); } public void run() { - int timeOut = param.getInt(PropertyName.TIME_OUT) / 2; + final int timeOut = param.getInt(PropertyName.TIME_OUT) / 2; int count = 0; finished = false; - log.println("TimeOutLogger: start"); + if (debug) log.println("TimeOutLogger: " + utils.getDateTime() + " start"); while (!finished && count < 200) { try { - log.println("TimeOutLogger: " + count); + if (debug) log.println("TimeOutLogger: "+utils.getDateTime() + count); synchronized (this) { wait(timeOut); } @@ -76,7 +79,7 @@ public class LoggingThread extends Thread { } catch (InterruptedException ex) { } } - log.println("TimeOutLogger: finished"); + if (debug) log.println("TimeOutLogger: " + utils.getDateTime() + " finished"); } /** @@ -88,7 +91,7 @@ public class LoggingThread extends Thread { synchronized (this) { notify(); } - log.println("TimeOutLogger: try to finish "); + if (debug) log.println("TimeOutLogger: " + utils.getDateTime() + " try to finish "); sleep(1000); } catch (InterruptedException ex) { } |