本文整理匯總了PHP中pocketmine\utils\MainLogger::notice方法的典型用法代碼示例。如果您正苦於以下問題:PHP MainLogger::notice方法的具體用法?PHP MainLogger::notice怎麽用?PHP MainLogger::notice使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pocketmine\utils\MainLogger
的用法示例。
在下文中一共展示了MainLogger::notice方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
//And then, look the offset up.
//timezone_name_from_abbr is not used because it returns false on some(most) offsets because it's mapping function is weird.
//That's been a bug in PHP since 2008!
foreach (\timezone_abbreviations_list() as $zones) {
foreach ($zones as $timezone) {
if ($timezone['offset'] == $offset) {
return $timezone['timezone_id'];
}
}
}
return \false;
}
if (isset($opts["enable-profiler"])) {
if (\function_exists("profiler_enable")) {
\profiler_enable();
$logger->notice("Execution is being profiled");
} else {
$logger->notice("No profiler found. Please install https://github.com/krakjoe/profiler");
}
}
function kill($pid)
{
switch (Utils::getOS()) {
case "win":
\exec("taskkill.exe /F /PID " . (int) $pid . " > NUL");
break;
case "mac":
case "linux":
default:
\exec("kill -9 " . (int) $pid . " > /dev/null 2>&1");
}