public class TaskLogFormatUtils extends Object
Constructor and Description |
---|
TaskLogFormatUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getTaskLog(Task task)
Returns a nicely formatted string showing all the tasks hierarchically.
|
static String |
getTaskLog(Task task,
int maxDepth)
Returns a formatted string from the
task including its descendant tasks. |
static String |
getTaskLog(Task task,
int maxDepth,
long subtaskThresholdMillisec)
Returns a formatted string from the
task including its descendant tasks. |
public static String getTaskLog(Task task)
task
nicely hierarchical formattedpublic static String getTaskLog(Task task, int maxDepth)
task
including its descendant tasks.
The log should include descendant tasks only in maxDepth
level at max.
When maxDepth
is set to a negative value, all the descendant tasks will be included.task
- the task to logmaxDepth
- the maximum depth until how deep child tasks should be logged. A negative maxDepth
value
will log all descendant tasks, maxDepth
of 0
only the rootTask, maxDepth
of 1
the rootTask plus its direct children, etc.public static String getTaskLog(Task task, int maxDepth, long subtaskThresholdMillisec)
task
including its descendant tasks.
The log should include descendant tasks only in maxDepth
level at max.
When maxDepth
is set to a negative value, all the descendant tasks will be included.
Also, the log should include descendant tasks only a descendant task takes more time than
subtaskThresholdMillisec
in milliseconds.
When subtaskThresholdMillisec
is set to a non-negative value, only descendant tasks which take not less
time than taskThresholdMillisec
will be included.task
- the task to logmaxDepth
- the maximum depth until how deep child tasks should be logged. A negative maxDepth
value
will log all descendant tasks, maxDepth
of 0
only the rootTask, maxDepth
of 1
the rootTask plus its direct children, etc.subtaskThresholdMillisec
- the threshold time milliseconds to include logs of subtasks under task
.Copyright © 2012–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.