• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP logMsg函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Error

 function Error($msg)
 {
     //erreur sur la classe FDPF, on la log avant d'arreter la génération...
     logMsg($msg);
     //Fatal error
     parent::Error($msg);
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:7,代码来源:convert.class.php


示例2: closed

 protected function closed($user)
 {
     logMsg("user with id: " . $user->{"id"} . " disconnected from the server.", "userDisconnected");
     // Do nothing: This is where cleanup would go, in case the user had any sort of
     // open files or other objects associated with them.  This runs after the socket
     // has been closed, so there is no need to clean up the socket itself here.
 }
开发者ID:AxelTLarsson,项目名称:shoppinglist,代码行数:7,代码来源:shoppinglistSocketServer.php


示例3: loadClass

 function loadClass($class, $param = NULL)
 {
     if (!is_string($class)) {
         logMsg(SL_ERROR, "参数错误!");
         exit(-3);
     }
     static $commonClasses = array();
     if (isset($commonClasses[$class]) && $commonClasses[$class] instanceof $class) {
         return $commonClasses[$class];
     }
     $filePath = '';
     foreach (array(INCLUDE_DIR, SRC_DIR) as $path) {
         if (file_exists($path . '/' . $class . '.php')) {
             $filePath = $path;
             break;
         }
     }
     if (!empty($filePath) && !isLoadFile($class) && class_exists($class, false) === FALSE) {
         require_once $filePath . '/' . $class . '.php';
     }
     if (INCLUDE_DIR === $filePath) {
         $commonClasses[$class] = isset($param) ? new $class($param) : new $class();
         return $commonClasses[$class];
     } else {
         if (SRC_DIR == $filePath) {
             return isset($param) ? new $class($param) : new $class();
         }
     }
     return FALSE;
 }
开发者ID:ethanshancn,项目名称:zhSpider,代码行数:30,代码来源:common.php


示例4: parseFeeds

 /**
  * Parses RSS feeds for new content
  */
 private function parseFeeds()
 {
     foreach ($this->rssConfig as $feed) {
         if (!isset($this->lastCheck[$feed['url']]) || $this->lastCheck[$feed['url']] + $feed['pollInterval'] * 60 < time()) {
             $this->lastCheck[$feed['url']] = time();
             logMsg("rssPlugin: Checking RSS: {$feed['url']}");
             try {
                 $content = file_get_contents($feed['url']);
                 $x = new SimpleXmlElement($content);
                 //RSS feed format
                 if (isset($x->channel)) {
                     foreach ($x->channel->item as $entry) {
                         $this->saveEntry($feed['title'], $feed['channel'], $entry->title, $entry->link);
                     }
                 } else {
                     //Atom feed format
                     if (isset($x->entry)) {
                         foreach ($x->entry as $entry) {
                             $this->saveEntry($feed['title'], $feed['channel'], $entry->title, $entry->link->attributes()->href);
                         }
                     }
                 }
                 $content = null;
                 $x = null;
             } catch (Exception $e) {
                 logMsg($e->getMessage());
             }
         }
     }
 }
开发者ID:nask0,项目名称:VikingBot,代码行数:33,代码来源:rssPlugin.php


示例5: getPlugins

 /**
  * Reads all plugins in the plugins directory of the server root.
  * @return array
  */
 public static function getPlugins($db = null)
 {
     if (!$db) {
         $db = Config::main()->getDBO();
     }
     $result = array();
     $path = DIAMONDMVC_ROOT . '/plugins';
     $dir = opendir($path);
     while ($curr = readdir($dir)) {
         if ($curr === '.' or $curr === '..') {
             continue;
         }
         if (!is_dir("{$path}/{$curr}")) {
             logMsg('Plugin ist kein Ordner: $path/$curr', 5);
             continue;
         }
         if (!file_exists("{$path}/{$curr}/{$curr}.php")) {
             logMsg("Plugin-Hauptskript nicht gefunden: {$path}/{$curr}/{$curr}.php");
             continue;
         }
         include_once "{$path}/{$curr}/{$curr}.php";
         if (!class_exists("Plugin{$curr}")) {
             logMsg("Plugin-Hauptklasse nicht gefunden: {$curr}");
             continue;
         }
         $className = "plugin{$curr}";
         $result[] = new $className($db);
     }
     return $result;
 }
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:34,代码来源:class_plugin.php


示例6: unregisterField

 /**
  * Removes a mapping.
  * @param integer $type Unique field type to remove.
  */
 public static function unregisterField($type)
 {
     if (isset(self::$fieldmap[$type])) {
         logMsg("FormBuilder: Removing field mapping {$type} -> " . self::$fieldmap[$type], 4);
         unset(self::$fieldmap[$type]);
     } else {
         logMsg("FormBuilder: Nothing to do. Field mapping {$type} not found.", 4);
     }
 }
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:13,代码来源:class_formbuilder.php


示例7: addLog

 public function addLog($iLevel, $sInfo, $sPath)
 {
     if (!$sInfo || !$sPath) {
         logMsg(SL_ERROR, 'Log param Error, now the sInfo is ' . $sInfo . ' sPath is ' . $sPath);
         return FALSE;
     }
     $strSql = "INSERT INTO {$this->dbName} (`sTime`,`iLevel`,`sInfo`,`sPath`) VALUES (NOW(),'{$iLevel}','{$sInfo}','{$sPath}')";
     return $this->dbConnect->exec($strSql);
 }
开发者ID:ethanshancn,项目名称:zhSpider,代码行数:9,代码来源:log.php


示例8: invokeRegisteredAutoloaders

 /**
  * If the fallback method is used, this method invokes all registered autoloaders.
  */
 public function invokeRegisteredAutoloaders($class)
 {
     foreach ($this->loaders as $loader) {
         try {
             call_user_func($loader, $class);
         } catch (Exception $ex) {
             logMsg('[CORE] Autoloader ' . (is_array($loader) ? $loader[1] : $loader) . ' threw an exception while loading class ' . $class);
         }
     }
 }
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:13,代码来源:autoload.php


示例9: dbConnect

function dbConnect()
{
    global $db, $dbFilename;
    $up = dirname(__FILE__) . '/../';
    if ($db = new PDO('sqlite:' . $up . $dbFilename)) {
        logMsg('DB', 'Db opened ok');
    } else {
        logMsg('ERROR', 'Db cannot be opened');
        die;
    }
}
开发者ID:bffmm1,项目名称:gmailcommunity,代码行数:11,代码来源:db.php


示例10: exec

 public function exec($strSql)
 {
     try {
         $iResult = $this->dbConnect->exec($strSql);
     } catch (PDOException $e) {
         logMsg(SL_ERROR, "SQL failed : " . $e->getMessage());
         echo $e->getMessage() . "\n";
         exit(-3);
     }
     return $iResult;
 }
开发者ID:ethanshancn,项目名称:zhSpider,代码行数:11,代码来源:DB.php


示例11: setConfig

 public function setConfig($key, $val)
 {
     if (!is_string($key) || !is_string($val)) {
         //记录日志
         logMsg(SL_ERROR, "参数错误!");
         return FALSE;
     }
     $this->arrConfig[$key] = $val;
     $content = json_encode($this->arrConfig);
     writeToFile(CONFIG_FILE, $content);
     return TRUE;
 }
开发者ID:ethanshancn,项目名称:zhSpider,代码行数:12,代码来源:config.php


示例12: read

 /**
  * Reads the INI from the given path.
  * @param  string       $file Path to the INI file to read in.
  * @return IniGenerator       This instance to enable method chaining.
  */
 public function read($file)
 {
     if (!file_exists($file)) {
         logMsg('Failed to read ini file "' . $file . '": not found', 9, 5);
     } else {
         ob_start();
         include $file;
         $contents = ob_get_contents();
         ob_end_clean();
         $this->data = parse_ini_string($contents, true);
     }
     return $this;
 }
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:18,代码来源:class_ini.php


示例13: execute

 public function execute()
 {
     // Försök rensa databasen
     if ($this->db->clear()) {
         // success
         $response = array("type" => "clearedList");
         logMsg("Cleared the list.", "clearedList");
     } else {
         // fail
         $resonse = array("type" => "error", "data" => "Det gick inte att rensa listan.");
     }
     return $response;
 }
开发者ID:AxelTLarsson,项目名称:shoppinglist,代码行数:13,代码来源:clearListCommand.php


示例14: execute

 /**
  *	Lägger till den nya posten i databasen
  * 	@return $response En array som berättar om vad som skedde (eller inte skedde)
  */
 public function execute()
 {
     // Försöka lägga till ny post
     if ($this->db->addItem($this->item)) {
         // success
         $response = array("type" => "addedItem", "data" => $this->item->getData(), "id" => $this->item->getId());
         logMsg("Added new item: " . $response["data"] . " (" . $response["id"] . ")", "addedItem");
     } else {
         // fail
         $response = array("type" => "error", "data" => "Det gick inte att lägga till: " . $this->item->getData() . " med id: " . $this->item->getId());
     }
     return $response;
 }
开发者ID:AxelTLarsson,项目名称:shoppinglist,代码行数:17,代码来源:addItemCommand.php


示例15: execute

 public function execute()
 {
     // Försöka uppdatera post
     if ($this->db->updateItem($this->item)) {
         // success
         $response = array("type" => "updatedItem", "data" => $this->item->getData(), "id" => $this->item->getId(), "isMarked" => $this->item->isMarked());
         logMsg("Updated item: (" . $response["id"] . ")" . " --> " . $response["data"], "updatedItem");
     } else {
         // fail
         $response = array("type" => "warn", "data" => "Det gick inte att uppdatera post: " . $this->item->getId());
     }
     return $response;
 }
开发者ID:AxelTLarsson,项目名称:shoppinglist,代码行数:13,代码来源:updateItemCommand.php


示例16: execute

 public function execute()
 {
     // Försök ta bort posten
     if ($this->db->removeItem($this->item)) {
         // success
         $response = array("type" => "removedItem", "id" => $this->item->getId());
         logMsg("Removed item: " . "(" . $response["id"] . ")", "removedItem");
     } else {
         // fail
         $response = array("type" => "error", "data" => "Det gick inte att ta bort post: " . $this->item->getId());
     }
     return $response;
 }
开发者ID:AxelTLarsson,项目名称:shoppinglist,代码行数:13,代码来源:removeItemCommand.php


示例17: checkAnswerExist

 public function checkAnswerExist($iAnswerId, $sHashId)
 {
     if (!is_string($sHashId) || !$iAnswerId) {
         logMsg(SL_ERROR, "参数错误!");
         echo "参数错误\n";
         exit(-3);
     }
     $strSql = "SELECT iLocalAnswerId FROM tbAnswer WHERE iAnswerId={$iAnswerId} AND sHashId='{$sHashId}' LIMIT 1";
     $result = $this->dbConnect->query($strSql);
     if (is_array($result) && isset($result[0]) && isset($result[0]['iLocalAnswerId'])) {
         return $result[0]['iLocalAnswerId'];
     } else {
         return FALSE;
     }
 }
开发者ID:ethanshancn,项目名称:zhSpider,代码行数:15,代码来源:DBModel.php


示例18: run

 public function run()
 {
     $dbModel = loadClass('DBModel');
     $userPageParam = array();
     while (1) {
         //若为空则尝试自动获取
         if (count($userPageParam) <= 0 || !isset($userPageParam['url'])) {
             $userPageParam = $dbModel->getNext();
         }
         if (is_array($userPageParam) && count($userPageParam) > 0) {
             logMsg(SL_DEBUG, "Start to handle user : " . json_encode($userPageParam));
             loadClass('userPage', $userPageParam);
             $userPageParam = array();
         }
         usleep(500);
     }
 }
开发者ID:ethanshancn,项目名称:zhSpider,代码行数:17,代码来源:dispatching.php


示例19: endSection

 public static function endSection()
 {
     if (Config::main()->get('DEBUG_MODE')) {
         $time = round(microtime(true));
         if (empty(self::$sections)) {
             logMsg("--- No section to end ---", 1, 5);
             return $this;
         }
         $section = array_pop(self::$sections);
         $section['end'] = $time;
         $section['memEnd'] = round(memory_get_usage() / 1024);
         logMsg("- Section {$section['name']} end -", 1, false);
         logMsg("Start: {$section['start']}s", 1, false);
         logMsg("End:   {$section['end']}s", 1, false);
         logMsg("Delta: " . ($section['end'] - $section['start']) . 's', 1, false);
         logMsg("Memory: {$section['memStart']} kiB - {$section['memEnd']} kiB", 1, false);
         logMsg("Median: " . ($section['memEnd'] + $section['memStart']) / 2 . ' kiB', 1, false);
     }
 }
开发者ID:Zyr93,项目名称:DiamondMVC,代码行数:19,代码来源:class_profiler.php


示例20: supportedPlatform

 /**
  * Checks if element references a specific platform
  *
  * @param string $platform Requested platform
  * @returns boolean TRUE if platform check succeeds
  *
  * @access private
  */
 function supportedPlatform($platform = NULL)
 {
     $regex = '/^(\\w*\\|)*' . $this->db->databaseType . '(\\|\\w*)*$/';
     if (!isset($platform) or preg_match($regex, $platform)) {
         logMsg("Platform {$platform} is supported");
         return TRUE;
     } else {
         logMsg("Platform {$platform} is NOT supported");
         return FALSE;
     }
 }
开发者ID:nicolasconnault,项目名称:moodle2.0,代码行数:19,代码来源:adodb-xmlschema.inc.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP logOut函数代码示例发布时间:2022-05-15
下一篇:
PHP logModuleCall函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap