本文整理匯總了PHP中DefaultLogger::setErrorStream方法的典型用法代碼示例。如果您正苦於以下問題:PHP DefaultLogger::setErrorStream方法的具體用法?PHP DefaultLogger::setErrorStream怎麽用?PHP DefaultLogger::setErrorStream使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DefaultLogger
的用法示例。
在下文中一共展示了DefaultLogger::setErrorStream方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: createLogger
/**
* 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;
}
示例2: createLogger
/**
* 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;
}
示例3: setErrorStream
/**
* Sets the error stream for the logging.
*
* @param OutputStream The error stream.
*
* @see DefaultLogger::setOutputStream()
*
* @author Noah Fontes <noah.fontes@bitextender.com>
* @since 1.0.0
*/
public function setErrorStream(OutputStream $error)
{
parent::setErrorStream($error);
$this->logger->setErrorStream($error);
}