summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-06-13 11:46:36 +0000
committerRüdiger Timm <rt@openoffice.org>2008-06-13 11:46:36 +0000
commit5a9f300312e753380b30c2ab60561b5609068688 (patch)
treed29a7c316334020dd2bd82bf71351adbd83ac3b9 /qadevOOo
parent1d3561e351afa5fd540bf0b3c491d8ef5b7f5041 (diff)
INTEGRATION: CWS qadev32 (1.6.2); FILE MERGED
2008/05/28 12:13:17 cn 1.6.2.1: #i87389# new innerclass OfficeWatcherPing
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/stats/SimpleLogWriter.java39
1 files changed, 18 insertions, 21 deletions
diff --git a/qadevOOo/runner/stats/SimpleLogWriter.java b/qadevOOo/runner/stats/SimpleLogWriter.java
index f1bfa64088f1..534f1a28f135 100644
--- a/qadevOOo/runner/stats/SimpleLogWriter.java
+++ b/qadevOOo/runner/stats/SimpleLogWriter.java
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: SimpleLogWriter.java,v $
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
* This file is part of OpenOffice.org.
*
@@ -27,13 +27,11 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
package stats;
import share.LogWriter;
import java.io.PrintWriter;
-import java.io.OutputStreamWriter;
import java.text.DecimalFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
@@ -49,12 +47,12 @@ public class SimpleLogWriter extends PrintWriter implements LogWriter {
Calendar cal = new GregorianCalendar();
DecimalFormat dfmt = new DecimalFormat("00");
super.println("LOG> Log started " +
- dfmt.format(cal.get(Calendar.DAY_OF_MONTH)) + "." +
- dfmt.format(cal.get(Calendar.MONTH)) + "." +
- dfmt.format(cal.get(Calendar.YEAR)) + " - " +
- dfmt.format(cal.get(Calendar.HOUR_OF_DAY)) + ":" +
- dfmt.format(cal.get(Calendar.MINUTE)) + ":" +
- dfmt.format(cal.get(Calendar.SECOND)));
+ dfmt.format(cal.get(Calendar.DAY_OF_MONTH)) + "." +
+ dfmt.format(cal.get(Calendar.MONTH)) + "." +
+ dfmt.format(cal.get(Calendar.YEAR)) + " - " +
+ dfmt.format(cal.get(Calendar.HOUR_OF_DAY)) + ":" +
+ dfmt.format(cal.get(Calendar.MINUTE)) + ":" +
+ dfmt.format(cal.get(Calendar.SECOND)));
super.flush();
}
@@ -66,24 +64,24 @@ public class SimpleLogWriter extends PrintWriter implements LogWriter {
}
public void println(String msg) {
- if (entry != null)
- {
+ if ((ow == null) && (entry != null)) {
this.ow = (share.Watcher) entry.UserDefinedParams.get("Watcher");
-
if (this.ow != null) {
this.ow.ping();
}
+ } else {
+ this.ow.ping();
}
- if (m_bLogging)
- {
- super.println("LOG> "+msg);
+
+ if (m_bLogging) {
+ super.println("LOG> " + msg);
super.flush();
}
- // else
- // {
- // super.println(" ++ " + msg);
- // super.flush();
- // }
+ // else
+ // {
+ // super.println(" ++ " + msg);
+ // super.flush();
+ // }
}
public boolean summary(share.DescEntry entry) {
@@ -97,5 +95,4 @@ public class SimpleLogWriter extends PrintWriter implements LogWriter {
public void setWatcher(Object watcher) {
entry.UserDefinedParams.put("Watcher", (share.Watcher) watcher);
}
-
}