本文整理汇总了PHP中logger::log_event方法的典型用法代码示例。如果您正苦于以下问题:PHP logger::log_event方法的具体用法?PHP logger::log_event怎么用?PHP logger::log_event使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类logger
的用法示例。
在下文中一共展示了logger::log_event方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete_csr_from_db
function delete_csr_from_db($person, $auth_key)
{
if (!$person->isAuth()) {
return false;
}
/* Verify that the CSR is present */
try {
$csr = get_csr_from_db_raw($person->getX509ValidCN(), $auth_key);
} catch (CSRNotFoundException $csrnfe) {
echo "No matching CSR found.<BR>\n";
$msg = "Could not delete CSR from ip " . $_SERVER['REMOTE_ADDR'];
$msg .= " : " . stripslashes($person->getX509ValidCN()) . " Reason: not found";
Logger::log_event(LOG_NOTICE, $msg);
return false;
} catch (ConfusaGenException $cge) {
$msg = "Error in deleting CSR (" . htmlentities($auth_key) . ")";
$msg .= "for user: " . htmlentities(stripslashes($person->getX509ValidCN())) . " ";
$msg .= "Too many hits!";
Framework::error_output($msg);
Logger::log_event(LOG_ALERT, $msg);
return false;
}
MDB2Wrapper::update("DELETE FROM csr_cache WHERE auth_key=? AND common_name=?", array('text', 'text'), array($auth_key, $person->getX509ValidCN()));
$msg = "Dropping csr " . $auth_key . " ";
$msg .= "for user " . stripslashes($person->getX509ValidCN()) . " (" . $_SERVER['REMOTE_ADDR'] . ") from csr_cache";
logger::log_event(LOG_NOTICE, $msg);
return true;
}