summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-07-30 04:54:23 (EDT)
committerEike Stepper2007-07-30 04:54:23 (EDT)
commitd3190f669dd9c168e244504e73ea10800fa7b6c2 (patch)
treeea04c4ad4e2db862817c94726878a67b36fc4cac
parent7a3b45aae976f1ee63905a44e00f06b6ba54cb6d (diff)
downloadcdo-d3190f669dd9c168e244504e73ea10800fa7b6c2.zip
cdo-d3190f669dd9c168e244504e73ea10800fa7b6c2.tar.gz
cdo-d3190f669dd9c168e244504e73ea10800fa7b6c2.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java25
1 files changed, 21 insertions, 4 deletions
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java
index 0e76fb3..8f6640f 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/om/monitor/Monitor.java
@@ -1,5 +1,7 @@
package org.eclipse.net4j.internal.util.om.monitor;
+import org.eclipse.net4j.internal.util.bundle.OM;
+import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.om.monitor.MonitorCanceledException;
import org.eclipse.net4j.util.om.monitor.OMMonitor;
import org.eclipse.net4j.util.om.monitor.OMSubMonitor;
@@ -10,6 +12,8 @@ import org.eclipse.net4j.util.om.monitor.TotalWorkExceededException;
*/
public abstract class Monitor implements OMMonitor, OMSubMonitor
{
+ private static final ContextTracer TRACER = new ContextTracer(OM.DEBUG, Monitor.class);
+
private static final int UNINITIALIZED = 0;
private Monitor parent;
@@ -226,12 +230,25 @@ public abstract class Monitor implements OMMonitor, OMSubMonitor
}
else
{
- for (int i = 0; i < level; i++)
+
+ if (TRACER.isEnabled())
{
- System.out.print(" ");
+ if (level == 0)
+ {
+ TRACER.trace(msg);
+ }
+ else
+ {
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < level; i++)
+ {
+ builder.append(" ");
+ }
+
+ builder.append(msg);
+ TRACER.trace(builder.toString());
+ }
}
-
- System.out.println(msg);
}
}