本文整理匯總了PHP中Logs::write方法的典型用法代碼示例。如果您正苦於以下問題:PHP Logs::write方法的具體用法?PHP Logs::write怎麽用?PHP Logs::write使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Logs
的用法示例。
在下文中一共展示了Logs::write方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: anketa
/**
* Печать анкеты
*/
public function anketa()
{
Logs::write(Core::getInstance()->user, 'amt', null);
if (!isset($_POST['anketa'])) {
throw new Exception('No personal data');
}
$data = $this->_prepareData($_POST['anketa']);
$parsedData = $this->_parseData($data);
$this->_sendEmail($parsedData);
$this->renderJsonSuccess("Анкета успешно отправлена!");
}
示例2: ensureIndex
/**
* 對文檔添加索引
*
* @param unknown_type $colName $colName 集合名
* @param unknown_type $index
* @return boolean|unknown
*/
public function ensureIndex($colName, $index = array())
{
$col = $this->_getCol($colName);
try {
$ret = $col->ensureIndex($index);
} catch (MongoCursorException $e) {
Logs::write("MongoPHP::ensureIndex() exception, error:" . $e->getMessage(), "log");
return false;
}
return $ret;
}
示例3: saveExorder
public function saveExorder($strDate, $nType, $nExorder)
{
try {
$sql = Exorder::getInsertExorderSql($strDate, $nType, $nExorder);
$bResult = $this->executeSql($sql);
if (!$bResult) {
Logs::write('ExorderDb::saveExorder():executeSql() failed', 'log');
return false;
}
return true;
} catch (Exception $e) {
Logs::write('ExorderDb::saveExorder() exception, err:' . $e->getMessage(), 'log');
return false;
}
return true;
}
示例4: addIndex
public function addIndex($keys)
{
try {
$result = $this->_mongo->getIndexInfo($this->_collection);
if ($result) {
return true;
}
foreach ($keys as $key => $value) {
if (is_array($value)) {
$index = $value;
} else {
$index = array($key => $value);
}
$bResult = $this->_mongo->ensureIndex($this->_collection, $index);
if (!$bResult) {
Logs::write('MongoRecord::addIndex():ensureIndex() failed, collection:' . $this->_collection, 'log');
return false;
}
}
return true;
} catch (Exception $e) {
Logs::write('MongoRecord::addIndex() exception, mongErr:' . $this->_mongo->getError() . ' err:' . ' file:' . $e->getFile() . ' line:' . $e->getLine() . ' message:' . $e->getMessage() . ' trace:' . $e->getTraceAsString(), 'log');
}
return false;
}