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


PHP Debug::Log方法代码示例

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


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

示例1: delWait

 /**
  * Delete
  *
  * @param int $message_type
  * @param int $msgid
  */
 public function delWait($message_type, $msgid)
 {
     if (isset($this->command_awaits[$message_type][$msgid])) {
         Debug::Log(Debug::DEBUG, "Forget " . Message::$name[$message_type] . " msgid={$msgid}");
         unset($this->command_awaits[$message_type][$msgid]);
         --$this->command_awaits_counter;
     }
 }
开发者ID:dethegeek,项目名称:mqtt,代码行数:14,代码来源:CMDStore.php

示例2: Append

 /**
  * Append some content to file
  *
  * @access public
  * @param string $sContent
  * @return boolean
  */
 public function Append($sContent)
 {
     try {
         return file_put_contents($this->sFile, $sContent, FILE_APPEND);
     } catch (Exception $e) {
         Debug::Log($e, ERROR);
         return false;
     }
 }
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:16,代码来源:file.class.php

示例3: __autoload

/**
 *
 * @param string $class_name
 * @return void
 */
function __autoload($class_name)
{
    if (stristr($class_name, "exception")) {
        require_once "include/" . 'exceptions.class.php';
        Debug::Log("Exceptions loaded!");
    } else {
        require_once "include/" . strtolower($class_name) . '.class.php';
        Debug::Log("Class " . $class_name . " loaded!");
    }
}
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:15,代码来源:core.php

示例4: Load

 public static function Load()
 {
     $file = PREFIX . "/lang/" . LANG . ".php";
     if (is_readable($file)) {
         require $file;
     } else {
         require PREFIX . "/lang/en.php";
     }
     /* default system language */
     self::$language = $lang;
     Debug::Log("Language '" . LANG . "', file : '" . $file) . "'";
 }
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:12,代码来源:i18n.class.php

示例5: Add

 /**
  *
  * @access public
  * @static
  * @param Rate $obj
  * @return Rate|false
  */
 public static function Add($obj)
 {
     $cmd = sprintf("INSERT INTO zi_rates (user_id,idea_id) VALUES(%d,%d)", $obj->user_id, $obj->idea_id);
     try {
         if (!Database::Query($cmd, false)) {
             throw new RateException("can't add rate");
         }
         $obj->rate_id = Database::GetLastInsertId();
     } catch (Exception $e) {
         Debug::Log($e, ERROR);
         return false;
     }
     return $obj;
 }
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:21,代码来源:rate.class.php

示例6: GetCollectionData

 /**
  *  function to not repeating same code in every method
  *  $query   sql query
  *  $message  message throwed by exception
  *  @access private
  *  @static
  *  @return Ideas|false
  */
 private static function GetCollectionData($query, $message = "error while getting ideas")
 {
     if (empty($query)) {
         return false;
     }
     $obj = new Ideas();
     try {
         $data = Database::Query($query);
         if (empty($data)) {
             throw new IdeasException($message);
         }
         foreach ($data as $row) {
             $obj->collection[] = Idea::GetById($row["idea_id"]);
         }
     } catch (Exception $e) {
         Debug::Log($e, WARNING);
         return false;
     }
     return $obj->collection;
 }
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:28,代码来源:ideas.class.php

示例7: registerUid

                            registerUid($formid);
                            $result = "STATE_VALID";
                        }
                        // Debug info
                        $debugtmp .= ", FORMID: " . $formid;
                    } else {
                        $txid = $reward->txid;
                        // Debug info
                        $debugtmp .= ", TXID VIA REWARD: " . $txid;
                        $result = "STATE_ALREADY_CLAIMED";
                    }
                } else {
                    $txid = $reward->txid;
                    // Debug info
                    $debugtmp .= ", TXID VIA IP: " . $txid;
                    $result = "STATE_ALREADY_CLAIMED";
                }
            } else {
                $txid = retrieveCookie();
                // Debug info
                $debugtmp .= ", TXID VIA COOKIE: " . $txid;
                $result = "STATE_ALREADY_CLAIMED";
            }
        }
    }
} else {
    $result = "STATE_SESSION_ERROR";
}
if ($result != "STATE_VALID") {
    Debug::Log("state_google.php, STATE: " . $result . $debugtmp);
}
开发者ID:bitoncoin,项目名称:mastercoin-faucet,代码行数:31,代码来源:state_google.php

示例8: Remove

 /**
  *
  * @access public
  * @return boolean
  */
 public static function Remove($comment, $user)
 {
     try {
         if ($user->user_id == $comment->user_id || $user->IsAdmin()) {
             $cmd = sprintf("DELETE FROM zi_comments WHERE comment_id=%d;", $comment->comment_id);
             if (!Database::Query($cmd, false)) {
                 throw new IdeaException("can't remove comment - database problem");
             }
         } else {
             throw new IdeaException("can't remove comment - user is not an owner of the comment ");
         }
     } catch (Exception $e) {
         Debug::Log($e, WARNING);
         return false;
     }
     return true;
 }
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:22,代码来源:comment.class.php

示例9: retrieveCookie

                                $txid = $reward->txid;
                                // Debug info
                                $debugtmp .= ", REQUESTID: " . $reward->requestid . ", TXID VIA REWARD: " . $txid;
                                $result = "STATE_ALREADY_CLAIMED";
                            }
                        } else {
                            $txid = $reward->txid;
                            // Debug info
                            $debugtmp .= ", REQUESTID: " . $reward->requestid . ", TXID VIA IP: " . $txid;
                            $result = "STATE_ALREADY_CLAIMED";
                        }
                    } else {
                        $txid = retrieveCookie();
                        // Debug info
                        $debugtmp .= ", TXID VIA COOKIE: " . $txid;
                        $result = "STATE_ALREADY_CLAIMED";
                    }
                } else {
                    $result = "STATE_NOT_QUALIFIED";
                }
            } else {
                $result = "STATE_INVALID_SIGNATURE";
            }
        }
    }
} else {
    $result = "STATE_SESSION_ERROR";
}
if ($result != "STATE_VALID") {
    Debug::Log("state_bitcointalk.php, STATE: " . $result . $debugtmp);
}
开发者ID:bitoncoin,项目名称:mastercoin-faucet,代码行数:31,代码来源:state_bitcointalk.php

示例10: RateMinus

 /**
  *
  * @access public
  * @return boolean
  */
 public static function RateMinus($idea)
 {
     $cmd = sprintf("UPDATE zi_ideas SET idea_rate=%d WHERE idea_id=%d", $idea->idea_rate -= 1, $idea->idea_id);
     try {
         if (!Database::Query($cmd, false)) {
             throw new IdeaException("can't rate minus idea");
         }
     } catch (Exception $e) {
         Debug::Log($e, ERROR);
         return false;
     }
     return true;
 }
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:18,代码来源:idea.class.php

示例11: GetCountByIdea

 /**
  *
  * @access public
  * @static
  * @param Idea $idea
  * @return integer|false
  */
 public static function GetCountByIdea($idea)
 {
     $cmd = sprintf("SELECT count(comment_id) AS comments_count FROM zi_comments WHERE idea_id=%d", $idea->idea_id);
     try {
         $data = Database::Query($cmd);
         if (empty($data)) {
             throw new IdeaException("can't get comments count for idea");
         }
     } catch (Exception $e) {
         Debug::Log($e, ERROR);
         return false;
     }
     return $data[0]["comments_count"];
 }
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:21,代码来源:comments.class.php

示例12: retrieveCookie

                            // Debug info
                            $debugtmp .= ", FORMID: " . $formid;
                        } else {
                            $txid = $reward->txid;
                            // Debug info
                            $debugtmp .= ", REQUESTID: " . $reward->requestid . ", TXID VIA REWARD: " . $txid;
                            $result = "STATE_ALREADY_CLAIMED";
                        }
                    } else {
                        $txid = $reward->txid;
                        // Debug info
                        $debugtmp .= ", REQUESTID: " . $reward->requestid . ", TXID VIA IP: " . $txid;
                        $result = "STATE_ALREADY_CLAIMED";
                    }
                } else {
                    $txid = retrieveCookie();
                    // Debug info
                    $debugtmp .= ", TXID VIA COOKIE: " . $txid;
                    $result = "STATE_ALREADY_CLAIMED";
                }
            } else {
                $result = "STATE_NOT_QUALIFIED";
            }
        }
    }
} else {
    $result = "STATE_SESSION_ERROR";
}
if ($result != "STATE_VALID") {
    Debug::Log("state_reddit.php, STATE: " . $result . $debugtmp);
}
开发者ID:bitoncoin,项目名称:mastercoin-faucet,代码行数:31,代码来源:state_reddit.php

示例13: GetLastInsertId

 /**
  *
  * @access public
  * @static
  * @return integer|false
  */
 public static function GetLastInsertId()
 {
     if (empty(self::$db_connection)) {
         if (!self::Init()) {
             return false;
         }
     }
     try {
         $id = @mysql_insert_id(self::$db_connection);
         if (mysql_error()) {
             throw new DatabaseException(mysql_error());
         }
     } catch (Exception $e) {
         Debug::Log($e, ERROR);
         return false;
     }
     return $id;
 }
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:24,代码来源:database.class.php

示例14: send

 public function send()
 {
     if (!$this->isSetHeader()) {
         $this->setHeader();
     }
     try {
         if (empty($this->to)) {
             throw new MailerException("no recipient of email");
         }
     } catch (Exception $e) {
         Debug::Log($e, WARNING);
         return false;
     }
     try {
         if (!@mail($this->to, $this->subject, $this->content, $this->header)) {
             throw new MailerException("mail function error");
         }
     } catch (Exception $e) {
         Debug::Log($e, WARNING);
         return false;
     }
     return true;
 }
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:23,代码来源:mailer.class.php

示例15: Update

 /**
  * Update user account
  * For now used only for new password
  *
  * @param object $user
  *
  * @return boolean if updated
  */
 public static function Update($user)
 {
     if (!User::GetById($user->user_id)) {
         Debug::Log($e, ERROR);
         return false;
     }
     $cmd = sprintf("UPDATE zi_users SET user_password=md5('%s'),user_name='%s',user_email='%s' WHERE user_id=%d", $user->user_password, $user->user_name, $user->user_email, $user->user_id);
     try {
         if (!Database::Query($cmd, false)) {
             throw new UserException("can't update user");
         }
     } catch (Exception $e) {
         Debug::Log($e, ERROR);
         return false;
     }
     return true;
 }
开发者ID:BGCX261,项目名称:zoneideas-svn-to-git,代码行数:25,代码来源:user.class.php


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