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