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