本文整理汇总了PHP中Logger::get_logger方法的典型用法代码示例。如果您正苦于以下问题:PHP Logger::get_logger方法的具体用法?PHP Logger::get_logger怎么用?PHP Logger::get_logger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Logger
的用法示例。
在下文中一共展示了Logger::get_logger方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testPageValid
/**
* @dataProvider provider
*/
public function testPageValid ($page, $user)
{
if (!empty ($user)) $this->login ($user);
$this->dispatch ($page);
$dom = new DomDocument;
Logger::get_logger ()->debug ($this->getResponse()->getBody());
$dom->loadXML ($this->getResponse()->getBody(), LIBXML_DTDLOAD);
$this->assertTrue ($dom->validate (), $this->getResponse()->getBody());
}
示例2: submitAction
function submitAction()
{
Zend_Loader::loadClass("UserModel");
$userm = new UserModel();
$user = $this->_request->get("user");
$obj = $userm->getRow($user);
if (empty($obj)) {
$this->_redirect("/");
}
$key = $this->initPasswordRecovery($user);
/* send email */
$mail = Mailer::get_mailer();
$baseurl = Zend_Controller_Front::getInstance()->getBaseUrl();
if ($baseurl == "/") {
$baseurl = "";
}
$mail->setBodyText("\n\nYou are receiving this email because you wished to reset your password\non http://{$_SERVER['SERVER_NAME']}{$baseurl}.\n\nPlease use the following link to reset your password:\n http://{$_SERVER['SERVER_NAME']}{$baseurl}/forgot-password/reset?user={$user}&key={$key}\n\n");
$mail->addTo($userm->getMember($obj, 0)->email, $userm->getMember($obj, 0)->name);
$mail->setSubject("Password Reset");
Logger::get_logger()->info("Sending password reset to " . $userm->getMember($obj, 0)->email);
$mail->send();
}
示例3: errorAction
public function errorAction()
{
global $__zend_test_no_dispatch;
$errors = $this->_getParam('error_handler');
switch ($errors->type) {
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
if (!empty($__zend_test_no_dispatch)) {
throw new Exception("404 Page Not Found");
}
// 404 error -- controller or action not found
$this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');
$this->view->message = "404 Page Not Found";
break;
default:
if (!empty($__zend_test_no_dispatch)) {
throw $errors->exception;
}
Logger::get_logger()->alert($errors->exception);
$exception = $errors->exception;
$this->view->message = "An unexpected internal error has occured. Our administrators have \nbeen notified of this error, and will look into it shortly. Please \nlet us know if the issue persists.\n\nError Details:\n" . ($exception->getMessage() . "\n" . $exception->getTraceAsString());
break;
}
}
示例4: exit
} else {
echo "You have to specify an end time or duration.\n";
exit(1);
}
}
$endTime = $dom->createElement("contestEndTime", date($xsdformat, $unix));
$root->appendChild($endTime);
}
if (empty($name)) {
$name = "Unnamed contest";
}
$e = $dom->createElement("name", $name);
$root->appendChild($e);
if (!empty($enable_queue_privacy)) {
$e = $dom->createElement("enable-queue-privacy", "true");
$root->appendChild($e);
}
$frontend = $dom->createElement("frontend");
$root->appendChild($frontend);
$home = $dom->createElement("page", "Home");
$frontend->appendChild($home);
$home->setAttribute("id", "home");
$home->setAttribute("href", "general/home.html");
file_put_contents(get_file_name("data/contests/{$id}.xml"), $dom->saveXML());
chmod(get_file_name("data/contests/{$id}.xml"), 0755);
if (empty($quiet)) {
echo "-----LOG-----\n";
echo $dom->saveXML();
echo "\nJust verify that the timestamps have been correctly parsed.\n";
Logger::get_logger()->info("contest added with: " . $argv);
}
示例5: init
function init()
{
$this->log = Logger::get_logger();
}
示例6: init
public function init()
{
$this->user = "";
$this->password = "";
$this->confirm = "";
$this->name0 = "";
$this->email0 = "";
$this->name1 = "";
$this->email1 = "";
$this->name2 = "";
$this->email2 = "";
$this->error_message = "";
$this->institute = "";
$this->country = "";
$this->timezone = "Asia/Calcutta";
$this->log = Logger::get_logger();
}
示例7: start_queue
/**
* Start the judge.
*
* @returns void
*/
function start_queue()
{
global $exit_on_done;
$logger = Logger::get_logger();
$logger->log("The queue has started.", Zend_Log::INFO);
while (!$this->terminating) {
$ar = $this->get_waiting_queue(1);
if (count($ar) > 1) {
throw new Exception("Too many elements");
}
if (empty($ar)) {
$this->awakener->wait();
continue;
}
foreach ($ar as $x) {
$this->start_process_submission($x);
}
}
$logger->log("Queue exiting gracefully.", Zend_Log::INFO);
exit(0);
}