本文整理匯總了PHP中X_Debug::getLevel方法的典型用法代碼示例。如果您正苦於以下問題:PHP X_Debug::getLevel方法的具體用法?PHP X_Debug::getLevel怎麽用?PHP X_Debug::getLevel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類X_Debug
的用法示例。
在下文中一共展示了X_Debug::getLevel方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: newThread
/**
* Create a new thread if $threadId is not already running
*
* @param string $threadId
* @return X_Threads_Thread_Info|X_Threads_Thread
*/
public function newThread($threadId)
{
$thread = $this->getMonitor()->getThread($threadId);
if ($thread->getState() == X_Threads_Thread_Info::STOPPED) {
// create a new thread and return it
$thread = new X_Threads_Thread($threadId, $this);
if (!$this->isLogger()) {
$thread->setLogger(new X_Threads_Logger_Null());
} else {
$thread->setLogger(new X_Threads_Logger_File("vlcShares.thread-{$threadId}.log", X_Debug::getLogPath()));
// redirect standard debug too if enabled
if (X_Debug::isEnabled()) {
X_Debug::i("Forking debug log to {" . X_Debug::getLogPath() . "/vlcShares.thread-{$threadId}.log");
X_Debug::init(X_Debug::getLogPath() . "/vlcShares.thread-{$threadId}.log", X_Debug::getLevel());
}
}
}
return $thread;
}
示例2: log
public function log($msg)
{
if ($this->logger == null) {
// initialize default logger
$this->setLogger(new X_Threads_Logger_File("vlcShares.thread-{$this->getId()}.log", sys_get_temp_dir()));
// redirect standard debug too if enabled
if (X_Debug::isEnabled()) {
X_Debug::init(sys_get_temp_dir() . "/vlcShares.thread-{$this->getId()}.log", X_Debug::getLevel());
}
}
$this->logger->log($msg);
}