本文整理汇总了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);
}