Package org.hippoecm.hst.diagnosis
Class TaskLogFormatUtils
java.lang.Object
org.hippoecm.hst.diagnosis.TaskLogFormatUtils
Utility class to get a pretty printed hierarchical task log.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetTaskLog(Task task) Returns a nicely formatted string showing all the tasks hierarchically.static StringgetTaskLog(Task task, int maxDepth) Returns a formatted string from thetaskincluding its descendant tasks.static StringgetTaskLog(Task task, int maxDepth, long subtaskThresholdMillisec) Returns a formatted string from thetaskincluding its descendant tasks.
-
Constructor Details
-
TaskLogFormatUtils
public TaskLogFormatUtils()
-
-
Method Details
-
getTaskLog
Returns a nicely formatted string showing all the tasks hierarchically.- Returns:
- returns the
tasknicely hierarchical formatted
-
getTaskLog
Returns a formatted string from thetaskincluding its descendant tasks. The log should include descendant tasks only inmaxDepthlevel at max. WhenmaxDepthis set to a negative value, all the descendant tasks will be included.- Parameters:
task- the task to logmaxDepth- the maximum depth until how deep child tasks should be logged. A negativemaxDepthvalue will log all descendant tasks,maxDepthof0only the rootTask,maxDepthof1the rootTask plus its direct children, etc.- Returns:
-
getTaskLog
Returns a formatted string from thetaskincluding its descendant tasks. The log should include descendant tasks only inmaxDepthlevel at max. WhenmaxDepthis 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 thansubtaskThresholdMillisecin milliseconds. WhensubtaskThresholdMillisecis set to a non-negative value, only descendant tasks which take not less time thantaskThresholdMillisecwill be included.- Parameters:
task- the task to logmaxDepth- the maximum depth until how deep child tasks should be logged. A negativemaxDepthvalue will log all descendant tasks,maxDepthof0only the rootTask,maxDepthof1the rootTask plus its direct children, etc.subtaskThresholdMillisec- the threshold time milliseconds to include logs of subtasks undertask.- Returns:
-