/** * Creates the default build logger for sending build events to the log. * @return BuildLogger The created Logger */ private function createLogger() { if ($this->loggerClassname !== null) { self::import($this->loggerClassname); // get class name part $classname = self::import($this->loggerClassname); $logger = new $classname(); } else { require_once 'phing/listener/DefaultLogger.php'; $logger = new DefaultLogger(); } $logger->setMessageOutputLevel(self::$msgOutputLevel); $logger->setOutputStream(self::$out); $logger->setErrorStream(self::$err); return $logger; }
/** * Creates the default build logger for sending build events to the log. * @return BuildLogger The created Logger */ private function createLogger() { if ($this->loggerClassname !== null) { self::import($this->loggerClassname); // get class name part $classname = self::import($this->loggerClassname); $logger = new $classname(); if (!$logger instanceof BuildLogger) { throw new BuildException($classname . ' does not implement the BuildLogger interface.'); } } else { require_once 'phing/listener/DefaultLogger.php'; $logger = new DefaultLogger(); } $logger->setMessageOutputLevel(self::$msgOutputLevel); $logger->setOutputStream(self::$out); $logger->setErrorStream(self::$err); return $logger; }
/** * Sets the error stream for the logging. * * @param OutputStream The error stream. * * @see DefaultLogger::setOutputStream() * * @author Noah Fontes <*****@*****.**> * @since 1.0.0 */ public function setErrorStream(OutputStream $error) { parent::setErrorStream($error); $this->logger->setErrorStream($error); }