1 18 19 package org.apache.tools.ant; 20 21 import org.apache.tools.ant.util.StringUtils; 22 23 27 public class NoBannerLogger extends DefaultLogger { 28 29 37 protected String targetName; 38 40 41 public NoBannerLogger() { 42 } 43 44 51 public void targetStarted(BuildEvent event) { 52 targetName = event.getTarget().getName(); 53 } 54 55 60 public void targetFinished(BuildEvent event) { 61 targetName = null; 62 } 63 64 73 public void messageLogged(BuildEvent event) { 74 75 if (event.getPriority() > msgOutputLevel 76 || null == event.getMessage() 77 || "".equals(event.getMessage().trim())) { 78 return; 79 } 80 81 if (null != targetName) { 82 out.println(StringUtils.LINE_SEP + targetName + ":"); 83 targetName = null; 84 } 85 86 super.messageLogged(event); 87 } 88 } 89 | Popular Tags |