/** * Prints the current target name * * @param object The BuildEvent * @access public * @see BuildEvent::getTarget() */ public function targetStarted(BuildEvent $event) { if (Project::MSG_INFO <= $this->msgOutputLevel) { $msg = PHP_EOL . $event->getProject()->getName() . ' > ' . $event->getTarget()->getName() . ':' . PHP_EOL; $this->printMessage($msg, $this->out, $event->getPriority()); } }
/** {@inheritDoc}. */ public function targetFinished(BuildEvent $event) { $this->log("<< TARGET FINISHED -- " . $event->getTarget()->getName(), Project::MSG_DEBUG); $time = $this->formatTime(Phing::currentTimeMillis() - $this->targetStartTime); $this->log($event->getTarget()->getName() . ": duration " . $time, Project::MSG_VERBOSE); flush(); }
function targetStarted(BuildEvent $event) { $target = $event->getTarget(); $this->targetName = $target->getName(); }
/** * Prints the current target name * * @param BuildEvent $event * @see BuildEvent::getTarget() */ public function targetStarted(BuildEvent $event) { if (Project::MSG_INFO <= $this->msgOutputLevel && $event->getTarget()->getName() != '') { $showLongTargets = $event->getProject()->getProperty("phing.showlongtargets"); $msg = PHP_EOL . $event->getProject()->getName() . ' > ' . $event->getTarget()->getName() . ($showLongTargets ? ' [' . $event->getTarget()->getDescription() . ']' : '') . ':' . PHP_EOL; $this->printMessage($msg, $this->out, $event->getPriority()); } }
/** * Fired when a target starts building, remembers the current time and the name of the target. * * @param BuildEvent $event An event with any relevant extra information. * Will not be <code>null</code>. */ public function targetStarted(BuildEvent $event) { $target = $event->getTarget(); $targetElement = $this->doc->createElement(XmlLogger::TARGET_TAG); $targetElement->setAttribute(XmlLogger::NAME_ATTR, $target->getName()); array_push($this->timesStack, Phing::currentTimeMillis()); array_push($this->elementStack, $targetElement); }
/** * Logs a message to say that the target has finished. * * @param BuildEvent $event * An event with any relevant extra information. Must not be * <code>null</code>. */ public function targetFinished(BuildEvent $event) { $start = array_pop($this->profileData); $name = "Target " . $event->getTarget()->getName(); $this->logFinish($event, $start, $name); }
/** * Prints the current target name * * @param object The BuildEvent * @access public * @see BuildEvent::getTarget() */ function targetStarted(BuildEvent $event) { if (PROJECT_MSG_INFO <= $this->msgOutputLevel) { print $this->lSep . $event->getProject()->getName() . ' > ' . $event->getTarget()->getName() . ':' . $this->lSep; } }
/** * Fired when a message is logged, this adds a message element to the * most appropriate parent element (task, target or build) and records * the priority and text of the message. * * @param BuildEvent An event with any relevant extra information. * Will not be <code>null</code>. */ function messageLogged(BuildEvent $event) { $priority = $event->getPriority(); if ($priority > $this->msgOutputLevel) { return; } $messageElement = $this->doc->createElement(XmlLogger::MESSAGE_TAG); switch ($priority) { case PROJECT_MSG_ERR: $name = "error"; break; case PROJECT_MSG_WARN: $name = "warn"; break; case PROJECT_MSG_INFO: $name = "info"; break; default: $name = "debug"; break; } $messageElement->setAttribute(XmlLogger::PRIORITY_ATTR, $name); $messageText = $this->doc->createCDATASection($event->getMessage()); $messageElement->appendChild($messageText); if ($event->getTask() != null) { $this->taskElement->appendChild($messageElement); } else { if ($event->getTarget() != null) { $this->targetElement->appendChild($messageElement); } else { if ($this->buildElement != null) { $this->buildElement->appendChild($messageElement); } } } }
/** * Handles the Phing target finished event. * * @param BuildEvent The Phing build event. * * @author Noah Fontes <*****@*****.**> * @since 1.0.0 */ public function targetFinished(BuildEvent $phingEvent) { $event = new AgaviPhingTargetEvent(); $event->setSource($phingEvent->getTarget()); $event->setTarget($phingEvent->getTarget()); $event->setProject($phingEvent->getProject()); foreach ($this->targetListeners as $listener) { $listener->targetLeft($event); } }
/** * Logs the end of a target. * * The event is only logged if the target is not an instance of * <code>AgaviProxyTarget</code>. * * @param BuildEvent An event containing the data to be logged. * * @see AgaviProxyTarget * @see DefaultLogger::targetStarted() * * @author Noah Fontes <*****@*****.**> * @since 1.0.0 */ public function targetFinished(BuildEvent $event) { if (!$event->getTarget() instanceof AgaviProxyTarget) { parent::targetFinished($event); } }