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


PHP log_notice函数代码示例

本文整理汇总了PHP中log_notice函数的典型用法代码示例。如果您正苦于以下问题:PHP log_notice函数的具体用法?PHP log_notice怎么用?PHP log_notice使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: log

 public function log($level, &$message) {
     switch ($level) {
         case LogHelper::LEVEL_DEBUG:
             log_debug($message);
             break;
         case LogHelper::LEVEL_INFO:
             log_info($message);
             break;
         case LogHelper::LEVEL_NOTICE:
             log_notice($message);
             break;
         case LogHelper::LEVEL_WARNING:
             log_warn($message);
             break;
         case LogHelper::LEVEL_ERROR:
             log_error($message);
             break;
         case LogHelper::LEVEL_CRITICAL:
             log_critical($message);
             break;
         case LogHelper::LEVEL_ALERT:
             log_alert($message);
             break;
         case LogHelper::LEVEL_EMERGENCY:
             log_emergency($message);
             break;
     }
 }
开发者ID:reisystems-india,项目名称:GovDashboard-Community,代码行数:28,代码来源:Log4DrupalMessageListener.php

示例2: cache_unset

function cache_unset($cache_key)
{
    $cache_key = _cache_prepare_cache_key($cache_key);
    log_notice("cache", "unset cache key {$cache_key}");
    if (isset($GLOBALS['cache_local'][$cache_key])) {
        unset($GLOBALS['cache_local'][$cache_key]);
    }
    $remote_rsp = _cache_do_remote('unset', $cache_key);
    return array('ok' => 1);
}
开发者ID:jacques,项目名称:flamework,代码行数:10,代码来源:lib_cache.php

示例3: cache_unset

function cache_unset($key, $more = array())
{
    $key = _cache_prepare_key($key, $more);
    unset($GLOBALS['_cache_local'][$key]);
    if ($GLOBALS['_cache_hooks']['unset']) {
        return call_user_func($GLOBALS['_cache_hooks']['unset'], $key);
    }
    log_notice("cache", "unset {$key}");
    return array('ok' => 1, 'local' => 1);
}
开发者ID:whosonfirst,项目名称:flamework,代码行数:10,代码来源:lib_cache.php

示例4: export_cache_path_for_sheet

function export_cache_path_for_sheet(&$sheet, &$more)
{
    if (!isset($more['filename'])) {
        log_notice('export', 'missing filename for export path');
        return null;
    }
    $root = export_cache_root_for_sheet($sheet);
    $parts = array($root, $more['filename']);
    return implode(DIRECTORY_SEPARATOR, $parts);
}
开发者ID:netcon-source,项目名称:dotspotting,代码行数:10,代码来源:lib_export_cache.php

示例5: cache_memcache_set

function cache_memcache_set($cache_key, $data)
{
    if (!$data) {
        log_notice("cache", "missing data to set key {$cache_key}");
        return array('ok' => 0, 'error' => 'missing data');
    }
    $memcache = cache_memcache_connect();
    if (!$memcache) {
        return array('ok' => 0, 'error' => 'failed to connect to memcache');
    }
    $ok = $memcache->set($cache_key, serialize($data));
    return array('ok' => $ok);
}
开发者ID:jacques,项目名称:flamework,代码行数:13,代码来源:lib_cache_memcache.php

示例6: action

 /**
  * Action
  *
  * Actions handled by this page:
  *   logout
  *
  * @param string $action_name Action
  */
 function action($action_name)
 {
     switch ($action_name) {
         case "logout":
             // Logout
             log_notice("Logout", "User: " . $_SESSION['client']['userdbo']->getUsername() . " logged out");
             session_destroy();
             $this->gotoPage("home");
             break;
         default:
             // No matching action, refer to base class
             parent::action($action_name);
     }
 }
开发者ID:carriercomm,项目名称:NeoBill,代码行数:22,代码来源:HomePage.class.php

示例7: login

 /**
  * Login Customer
  */
 function login()
 {
     if ($this->post['user']->getPassword() == $this->post['password']) {
         // Only customers are allowed to login to the order form
         if ($this->post['user']->getType() != "Client") {
             $this->setError(array("type" => "[ONLY_CUSTOMERS_CAN_LOGIN]"));
             return;
         }
         // Login success
         $_SESSION['client']['userdbo'] = $this->post['user'];
         log_notice("CustomerLoginPage::login()", "User: " . $this->post['user']->getUsername() . " logged in.");
         $this->gotoPage("cart");
     } else {
         // Login failure
         log_security("CustomerLoginPage::login()", "Password Incorrect.");
         $this->setError(array("type" => "[LOGIN_FAILED]"));
     }
 }
开发者ID:carriercomm,项目名称:NeoBill,代码行数:21,代码来源:CustomerLoginPage.class.php

示例8: Engine_ErrorHandler

function Engine_ErrorHandler($errno, $errstr, $errfile, $errline)
{
    switch ($errno) {
        case E_ERROR:
            log_error($errstr, $errfile, $errline);
            break;
        case E_PARSE:
            log_error($errstr, $errfile, $errline);
            break;
        case E_WARNING:
            log_warning($errstr, $errfile, $errline);
            break;
        case E_NOTICE:
            log_notice($errstr, $errfile, $errline);
            break;
        default:
            log_notice($errstr, $errfile, $errline);
    }
}
开发者ID:romlg,项目名称:cms36,代码行数:19,代码来源:error.lib.php

示例9: login

 /**
  * Login
  *
  * Validate the login.  Store the UserDBO in the session if OK, or display an error
  * if the login failed.
  */
 function login()
 {
     try {
         $user_dbo = load_UserDBO($this->post['username']);
         if ($user_dbo->getPassword() == $this->post['password'] && ($user_dbo->getType() == "Administrator" || $user_dbo->getType() == "Account Manager")) {
             // Login success
             if (isset($this->post['theme'])) {
                 $user_dbo->setTheme($this->post['theme']);
             }
             $_SESSION['client']['userdbo'] = $user_dbo;
             log_notice("Login", "User: " . $user_dbo->getUsername() . " logged in");
             $_SESSION['jsFunction'] = "reloadMenu()";
             $this->gotoPage("home");
         }
     } catch (DBNoRowsFoundException $e) {
     }
     // Login failure
     log_security("Login", "Login failed for " . $this->post['username']);
     throw new SWUserException("[LOGIN_FAILED]");
 }
开发者ID:carriercomm,项目名称:NeoBill,代码行数:26,代码来源:LoginPage.class.php

示例10: cache_memcache_connect

function cache_memcache_connect()
{
    if (!isset($GLOBALS['remote_cache_conns']['memcache'])) {
        $host = $GLOBALS['cfg']['memcache_host'];
        $port = $GLOBALS['cfg']['memcache_port'];
        $start = microtime_ms();
        $memcache = new Memcache();
        if (!$memcache->connect($host, $port)) {
            $memcache = null;
        }
        if (!$memcache) {
            log_fatal("Connection to memcache {$host}:{$port} failed");
        }
        $end = microtime_ms();
        $time = $end - $start;
        log_notice("cache", "connect to memcache {$host}:{$port} ({$time}ms)");
        $GLOBALS['remote_cache_conns']['memcache'] = $memcache;
        $GLOBALS['timings']['memcache_conns_count']++;
        $GLOBALS['timings']['memcache_conns_time'] += $time;
    }
    return $GLOBALS['remote_cache_conns']['memcache'];
}
开发者ID:netcon-source,项目名称:dotspotting,代码行数:22,代码来源:lib_cache_memcache.php

示例11: db_ping

function db_ping($cluster, $shard = null)
{
    $cluster_key = _db_cluster_key($cluster, $shard);
    if (is_resource($GLOBALS['db_conns'][$cluster_key])) {
        $start = microtime_ms();
        $ret = @mysql_ping($GLOBALS['db_conns'][$cluster_key]);
        $end = microtime_ms();
        log_notice('db', "DB-{$cluster_key}: Ping", $end - $start);
        return $ret;
    }
    return FALSE;
}
开发者ID:jacques,项目名称:flamework,代码行数:12,代码来源:lib_db.php

示例12: _hash

 function _hash($data, $controlType)
 {
     if (!$this->enabling) {
         return false;
     }
     switch ($controlType) {
         case 'md5':
             return md5($data);
         case 'crc32':
             return sprintf('% 32d', crc32($data));
         case 'strlen':
             return sprintf('% 32d', strlen($data));
         default:
             log_notice('Не определенн контроль записи "' . $controlType . '" кэша данных');
     }
 }
开发者ID:romlg,项目名称:cms36,代码行数:16,代码来源:data_cache.class.php

示例13: notice

 /**
  * Notice logging
  * 
  * @param string $message
  */
 public static function notice($message)
 {
     log_notice($message);
 }
开发者ID:jokopurnomoa,项目名称:elips-php,代码行数:9,代码来源:Log.php

示例14: shown

# * notice - Some action has happened that's useful for debugging
#
# By default, errors and fatals are always shown, but notices are only shown when
# `debug=1` is passed in the querystring or `$cfg['admin_flags_show_notices']` is
# set. Messages are only shown (on webpages) for callers with appropriate auth
# (see lib_auth.php for more details).
#
# The 'html' and 'plain' handlers are smart and will only show output where appropriate - the
# html version for web pages and the plain version for CLI scripts.
#
$GLOBALS['log_handlers'] = array('notice' => array('html', 'plain'), 'error' => array('html', 'plain', 'error_log'), 'fatal' => array('html', 'plain', 'error_log'));
$GLOBALS['log_html_colors'] = array('db' => '#eef,#000', 'cache' => '#fdd,#000', 'smarty' => '#efe,#000', 'http' => '#ffe,#000', '_error' => '#fcc,#000', '_fatal' => '#800,#fff');
#
# log a startup notice so we know what page this is and what env
#
log_notice('init', "this is {$_SERVER['SCRIPT_NAME']} on {$GLOBALS['cfg']['environment']}");
###################################################################################################################
#
# public api
#
function log_fatal($msg)
{
    _log_dispatch('fatal', $msg);
    error_500();
    exit;
}
function log_error($msg)
{
    _log_dispatch('error', $msg);
}
function log_notice($type, $msg, $time = -1)
开发者ID:whosonfirst,项目名称:flamework,代码行数:31,代码来源:lib_log.php

示例15: cache_memcache_unset

function cache_memcache_unset($key)
{
    $memcache = cache_memcache_connect();
    if (!$memcache) {
        log_error('Failed to connect to memcache for unset');
        return array('ok' => 0, 'local' => 1, 'remote' => 0, 'error' => 'memcache_cant_connect');
    }
    $ok = $memcache->delete($key);
    if (!$ok) {
        log_error("Failed to unset memcache key {$key}");
        return array('ok' => 0, 'local' => 1, 'remote' => 0, 'error' => 'memcache_unset_failed');
    }
    log_notice("cache", "remote unset {$key}");
    return array('ok' => 1, 'local' => 1, 'remote' => 1);
}
开发者ID:whosonfirst,项目名称:flamework,代码行数:15,代码来源:lib_cache_memcache.php


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