*/
public static void register(ProjectComponent task, final Ivy ivy) {
MessageLogger current = ivy.getLoggerEngine().peekLogger();
if (current instanceof AntMessageLogger && task instanceof Task
&& ((AntMessageLogger) current).task instanceof Task) {
Task currentTask = (Task) ((AntMessageLogger) current).task;
if ((currentTask.getTaskName() != null)
&& currentTask.getTaskName().equals(((Task) task).getTaskName())) {
// The current AntMessageLogger already logs with the same
// prefix as the given task. So we shouldn't do anything...
return;
}
}