1 56 package org.objectstyle.cayenne.tools; 57 58 import org.apache.log4j.AppenderSkeleton; 59 import org.apache.log4j.spi.LoggingEvent; 60 import org.apache.tools.ant.Project; 61 import org.apache.tools.ant.Task; 62 63 69 class AntAppender extends AppenderSkeleton { 70 71 Task task; 72 73 AntAppender(Task task) { 74 if (task == null) { 75 throw new NullPointerException ("Null Task"); 76 } 77 78 this.task = task; 79 } 80 81 85 protected void append(LoggingEvent event) { 86 Object message = event.getMessage(); 87 if (message == null) { 88 return; 89 } 90 91 task.log(message.toString(), Project.MSG_VERBOSE); 93 } 94 95 public void close() { 96 97 } 98 99 public boolean requiresLayout() { 100 return false; 101 } 102 } | Popular Tags |