Add debug message in Task.run

This commit is contained in:
huangyuhui
2018-06-30 22:24:46 +08:00
parent aa170b647e
commit 2bd4bc1472
2 changed files with 5 additions and 1 deletions

View File

@@ -29,6 +29,7 @@ import java.util.Collections;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function; import java.util.function.Function;
import java.util.logging.Level;
/** /**
* Disposable task. * Disposable task.
@@ -185,6 +186,9 @@ public abstract class Task {
} }
public final void run() throws Exception { public final void run() throws Exception {
if (getSignificance().shouldLog())
Logging.LOG.log(Level.FINE, "Executing task: " + getName());
for (Task task : getDependents()) for (Task task : getDependents())
doSubTask(task); doSubTask(task);
execute(); execute();