当前位置: 首页>>代码示例>>PHP>>正文


PHP Logger::notice方法代码示例

本文整理汇总了PHP中Logger::notice方法的典型用法代码示例。如果您正苦于以下问题:PHP Logger::notice方法的具体用法?PHP Logger::notice怎么用?PHP Logger::notice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Logger的用法示例。


在下文中一共展示了Logger::notice方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: process

 /**
  * {@inheritdoc}
  */
 public function process($annotation, $context)
 {
     if ($annotation instanceof Info && $annotation->validate()) {
         $root = $context->getRootContext();
         if ($root->info !== null) {
             Logger::notice('Overwriting ' . $annotation->identity() . ': "' . $root->info->_context . '" with "' . $annotation->_context . '"');
         }
         $root->info = $annotation;
     }
 }
开发者ID:Lazybin,项目名称:huisa,代码行数:13,代码来源:InfoProcessor.php

示例2: helper

 public function helper($name)
 {
     $path = SYS_PATH . DS . 'helpers' . DS . $name . '.helper.php';
     if (!file_exists($path)) {
         if (!file_exists($path)) {
             return Logger::notice('Can\'t load helper ' . $name . '.helper.php');
         }
         $path = APP_PATH . DS . 'helpers' . DS . $name . '.helper.php';
     }
     include $path;
 }
开发者ID:vnnn144,项目名称:ultimate,代码行数:11,代码来源:loader.class.php

示例3: sanityCheck

 /**
  * Checks if data for this field is valid and removes broken dependencies
  *
  * @param Object_Abstract $object
  * @return bool
  */
 public function sanityCheck($object)
 {
     $key = $this->getName();
     $sane = true;
     try {
         $this->checkValidity($object->{$key}, true);
     } catch (Exception $e) {
         Logger::notice("Detected insane relation, removing reference to non existent user with username [" . $object->{$key} . "]");
         $object->{$key} = null;
         $sane = false;
     }
     return $sane;
 }
开发者ID:ngocanh,项目名称:pimcore,代码行数:19,代码来源:User.php

示例4: set

 public function set($key, $obj, $expire = 0)
 {
     if (!$this->enabled) {
         return false;
     }
     $success = $this->memcache->set($key, $obj, 0, $expire);
     if ($success) {
         Logger::info("Cache stored memcache key: {$key}");
     } else {
         Logger::notice("Cache failed to store memcache key: {$key}");
     }
     Cache::$sets[] = array('key' => $key, 'expire' => $expire, 'success' => $success);
     return $success;
 }
开发者ID:stephenhandley,项目名称:temovico,代码行数:14,代码来源:Cache.php

示例5: test_methods_Magento

 public function test_methods_Magento()
 {
     $CONFIG_FILE_NAME = __DIR__ . '/logging_exception.yaml';
     $LOGGER_NAME = 'defaultLoggerName';
     /**
      * Perform testing.
      */
     $log = new Logger($CONFIG_FILE_NAME, $LOGGER_NAME);
     $context = ['test' => true, 'env' => ['param1' => 'value1']];
     $log->debug('debug', $context);
     $log->info('info', $context);
     $log->notice('notice', $context);
     $log->warning('warning', $context);
     $log->error('error', $context);
     $log->alert('alert', $context);
     $log->critical('critical', $context);
     $log->emergency('emergency', $context);
 }
开发者ID:praxigento,项目名称:mage_ext_logging,代码行数:18,代码来源:Logger_Test.php

示例6: logError

 public static function logError($type, $msg, $file, $line)
 {
     $str = LogVars::$friendlyErrorType[$type] . ': ' . $msg . ' ' . $file . ':' . $line;
     if (in_array($type, LogVars::$warnType)) {
         Logger::warn('handle', $str);
     } else {
         if (in_array($type, LogVars::$errorType)) {
             Logger::error('handle', $str);
             Url::redirect404();
         } else {
             if (in_array($type, LogVars::$noticeType)) {
                 Logger::notice('handle', $str);
             } else {
                 Logger::fatal('handle', $str);
                 Url::redirect404();
             }
         }
     }
     return true;
 }
开发者ID:aozhongxu,项目名称:web_hqoj,代码行数:20,代码来源:ErrorHandler.class.php

示例7: log

 private static function log($type, $msg, $errorNo, $params)
 {
     if (class_exists('Xiaoju\\Beatles\\Utils\\Logger')) {
         switch ($type) {
             case 'debug':
                 Logger::debug($msg, $errorNo, $params);
                 break;
             case 'trace':
                 Logger::trace($msg, $errorNo, $params);
                 break;
             case 'notice':
                 Logger::notice($msg, $errorNo, $params);
                 break;
             case 'warning':
                 Logger::warning($msg, $errorNo, $params);
                 break;
             case 'fatal':
                 Logger::fatal($msg, $errorNo, $params);
                 break;
         }
     }
 }
开发者ID:Whispersong,项目名称:phputils,代码行数:22,代码来源:memcache.php

示例8: initialized

 function initialized()
 {
     $ret = false;
     if (is_writable($this->locations["tmp"])) {
         if (!file_exists($this->locations["tmp"] . "/initialized.txt")) {
             umask(02);
             Logger::notice("App instance has not been initialized yet - doing so now");
             if (extension_loaded("apc")) {
                 Logger::notice("Flushing APC cache");
                 apc_clear_cache();
             }
             // Create required directories for program execution
             if (!file_exists($this->locations["tmp"] . "/compiled/")) {
                 mkdir($this->locations["tmp"] . "/compiled/", 02775);
             }
             $ret = touch($this->locations["tmp"] . "/initialized.txt");
         } else {
             $ret = true;
         }
     }
     return $ret;
 }
开发者ID:ameyer430,项目名称:elation,代码行数:22,代码来源:app_class.php

示例9: safeRedirect

 /**
  * Redirect, but only to a safe domain.
  *
  * @param string $Destination Where to redirect.
  * @param int $StatusCode The status of the redirect. Defaults to 302.
  */
 function safeRedirect($Destination = false, $StatusCode = null)
 {
     if (!$Destination) {
         $Destination = Url('', true);
     } else {
         $Destination = Url($Destination, true);
     }
     $trustedDomains = TrustedDomains();
     $isTrustedDomain = false;
     foreach ($trustedDomains as $trustedDomain) {
         if (urlMatch($trustedDomain, $Destination)) {
             $isTrustedDomain = true;
             break;
         }
     }
     if ($isTrustedDomain) {
         redirect($Destination, $StatusCode);
     } else {
         Logger::notice('Redirect to untrusted domain: {url}.', ['url' => $Destination]);
         redirect(url("/home/leaving?Target=" . urlencode($Destination)));
     }
 }
开发者ID:vanilla,项目名称:vanilla,代码行数:28,代码来源:functions.general.php

示例10: notice

 /**
  * Normal but significant events.
  *
  * @param string $message
  * @param array $context
  *
  * @return null
  */
 public function notice($message, array $context = array())
 {
     \Logger::notice($message);
 }
开发者ID:luklewluk,项目名称:SupercachePlugin,代码行数:12,代码来源:LoggerProxy.php

示例11: sendMailFromTemplate

 /**
  * @TODO comment this function
  */
 protected function sendMailFromTemplate($recipients, $subject, $params, $templateFilename, $plaintext = true)
 {
     $fullTemplateFilename = dirname(__FILE__) . "/../templates/{$templateFilename}.txt";
     Logger::debug("Template: {$fullTemplateFilename}");
     $template = file_get_contents($fullTemplateFilename);
     // @TODO Replace this with proper template stuff
     $mailBody = $this->replaceTokens($template, $params);
     if (true === $plaintext) {
         $this->sendPlainTextMail($this->from, $recipients, $subject, $mailBody);
         Logger::notice("Sent plaintext mail to [{$recipients}] with subject \"{$subject}\"");
     } else {
         $mailStatus = $this->sendHtmlMail($this->from, $recipients, $subject, $mailBody);
     }
 }
开发者ID:robertzx,项目名称:phpIPN,代码行数:17,代码来源:MailManager.php

示例12: getLevelName

        }
    }
    public function getLevelName($level)
    {
        return $this->logLevels[$level];
    }
}
// testing
if (isset($_SERVER["argv"][1]) && $_SERVER["argv"][1] == "__main__") {
    $logger = new Logger();
    for ($i = 0; $i < 6; $i++) {
        $logger->setLevel($i);
        error_log("############## Level now: " . $i);
        $logger->debug("");
        $logger->info("");
        $logger->notice("");
        $logger->warn("");
        $logger->error("");
        $logger->critical("");
    }
    error_log("############# With Level Names");
    for ($i = 0; $i < 6; $i++) {
        $logger->setLevel($logger->getLevelName($i));
        error_log("############## Level now: " . $logger->getLevelName($i));
        $logger->debug("");
        $logger->info("", __FILE__, __LINE__);
        $logger->notice("");
        $logger->warn("");
        $logger->error("");
        $logger->critical("");
    }
开发者ID:vasiatka,项目名称:sitemap,代码行数:31,代码来源:Logger.php

示例13: catch

         $prepayItem = $txn->getPrepayItem($oneType);
         if (true === is_null($prepayItem)) {
             //Logger::debug("No match for $oneType");
             continue;
         }
         $templateFound = true;
         $params['quantity'] = $prepayItem['quantity'];
         $params['item_name'] = $prepayItem['item_name'];
         $mail = SingletonFactory::getInstance()->getSingleton('MailManager');
         if ("Completed" === $payment_status) {
             try {
                 $status = $mail->sendConfirmationMailToUser($to, $params, $oneType);
             } catch (Exception $e) {
                 kaput($e->getMessage());
             }
             Logger::notice("Sent confirmation mail (type={$oneType}) successfully to {$to}");
         }
         $params['payment_status'] = $payment_status;
         try {
             $mail->sendTransactionMailToAdmins($params);
         } catch (Exception $e) {
             kaput($e->getMessage());
         }
         Logger::debug("Sent notification mail to admins successfully, payment_status={$payment_status}");
     }
     if (false === $templateFound) {
         Logger::error("Unable to find e-mail template");
     }
 } else {
     Logger::debug("Mail disabled, not sending mail");
 }
开发者ID:robertzx,项目名称:phpIPN,代码行数:31,代码来源:notify.php

示例14: array

<?php

$userId = null;
$basic = new Uauth\Basic("Secured Area", array());
$basic->verify(function ($username, $password) use(&$userId) {
    $select = PicDB::newSelect();
    $select->cols(array("id"))->from("users")->where("username = :username")->where("password = :password")->bindValues(array("username" => $username, "password" => $password));
    $id = PicDB::fetch($select, "value");
    if ($id) {
        $userId = (int) $id;
        return true;
    } else {
        return false;
    }
});
$basic->deny(function ($username) {
    if ($username !== null) {
        Logger::notice("main", "Failed login", array("username" => $username));
    }
});
$basic->auth();
define("USERNAME", $basic->getUser());
define("USER_ID", $userId);
Logger::debug("main", "Successful authentication");
header("Content-Security-Policy: script-src 'self' https://cdnjs.cloudflare.com; style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com");
开发者ID:djmattyg007,项目名称:pictorials,代码行数:25,代码来源:auth.php

示例15: shutdownHandler

 function shutdownHandler()
 {
     if ($this->debug && !empty($res)) {
         $res = $this->timer->getResult();
         $str[] = '[time:';
         foreach ($res as $time) {
             $str[] = ' ' . $time[0] . '=' . $time[1];
         }
         $str[] = ']';
         Logger::notice(implode('', $str) . ' status=' . $this->status);
         Logger::flush();
     }
     $this->_clearDbOrCache();
     $this->_end();
 }
开发者ID:xtzlyp,项目名称:newpi,代码行数:15,代码来源:App.php


注:本文中的Logger::notice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。