本文整理汇总了PHP中Zend_Log_Writer_Stream::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Log_Writer_Stream::__construct方法的具体用法?PHP Zend_Log_Writer_Stream::__construct怎么用?PHP Zend_Log_Writer_Stream::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend_Log_Writer_Stream
的用法示例。
在下文中一共展示了Zend_Log_Writer_Stream::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($url, $mode = null)
{
// Setting the default
if (null === $mode) {
$mode = 'a';
}
$this->_mode = $mode;
$this->_url = $url;
parent::__construct($url, $mode);
$this->setFormatter(new Zend_Log_Formatter_Simple("%message%\n"));
}
示例2: __construct
/**
* Store alerts for logs into system.log and exception.log
*
* @param array|string|resource $streamOrUrl
* Stream or URL to open as a stream
* @param string|null $mode
* Mode, only applicable if a URL is given
* @return void
* @throws Zend_Log_Exception
*/
public function __construct($streamOrUrl, $mode = null)
{
$logFiles = explode(PHP_EOL, Mage::getStoreConfig('extensions_store_storealerts/configuration/log_files'));
$logFiles[] = Mage::getStoreConfig('dev/log/file');
$logFiles[] = Mage::getStoreConfig('dev/log/exception_file');
$logFile = basename($streamOrUrl);
if (in_array($logFile, $logFiles)) {
$this->_log = true;
}
parent::__construct($streamOrUrl, $mode);
}
示例3: __construct
public function __construct($streamOrUrl = null, $mode = null)
{
if ($streamOrUrl) {
parent::__construct($streamOrUrl, $mode);
}
}
示例4: __construct
public function __construct($streamOrUrl, $mode = null, $filterPriority = \Zend_Log::ERR)
{
parent::__construct($streamOrUrl, $mode = null);
$this->setFilterPriority($filterPriority);
}
示例5: __construct
/**
* overload parent::__construct
*
* @param Stream $logFile
* @param string|null $mode
*/
public function __construct($logFile, $mode = NULL)
{
$this->_logfile = $logFile;
return parent::__construct($logFile, $mode);
}
示例6: __construct
public function __construct($streamOrUrl, $mode = null)
{
$streamOrUrl = $streamOrUrl ?: $this->_getConfig()->getLogFile();
parent::__construct($streamOrUrl, $mode);
$this->_formatter = $this->_getNewFormatter();
}
示例7: __construct
public function __construct($streamOrUrl, $mode = NULL)
{
self::$_ilfp = $streamOrUrl;
return parent::__construct($streamOrUrl, $mode);
}