Merge remote-tracking branch 'origin/php/7.0'

This commit is contained in:
Dylan K. Taylor 2017-09-09 21:57:44 +01:00
commit 3b9689674d
3 changed files with 9 additions and 7 deletions

View File

@ -534,7 +534,7 @@ namespace pocketmine {
if(\Phar::running(true) === ""){ if(\Phar::running(true) === ""){
$logger->warning("Non-packaged PocketMine-MP installation detected, do not use on production."); $logger->warning("Non-packaged PocketMine-MP installation detected. Consider using a phar in production for better performance.");
} }
ThreadManager::init(); ThreadManager::init();

View File

@ -105,8 +105,8 @@ class MainLogger extends \AttachableThreadedLogger{
$this->send($message, \LogLevel::INFO, "INFO", TextFormat::WHITE); $this->send($message, \LogLevel::INFO, "INFO", TextFormat::WHITE);
} }
public function debug($message){ public function debug($message, bool $force = false){
if($this->logDebug === false){ if($this->logDebug === false and !$force){
return; return;
} }
$this->send($message, \LogLevel::DEBUG, "DEBUG", TextFormat::GRAY); $this->send($message, \LogLevel::DEBUG, "DEBUG", TextFormat::GRAY);
@ -156,7 +156,7 @@ class MainLogger extends \AttachableThreadedLogger{
$errfile = \pocketmine\cleanPath($errfile); $errfile = \pocketmine\cleanPath($errfile);
$this->log($type, get_class($e) . ": \"$errstr\" ($errno) in \"$errfile\" at line $errline"); $this->log($type, get_class($e) . ": \"$errstr\" ($errno) in \"$errfile\" at line $errline");
foreach(\pocketmine\getTrace(0, $trace) as $i => $line){ foreach(\pocketmine\getTrace(0, $trace) as $i => $line){
$this->debug($line); $this->debug($line, true);
} }
} }

View File

@ -1,6 +1,8 @@
param ( [CmdletBinding(PositionalBinding=$false)]
param (
[string]$php = "", [string]$php = "",
[switch]$Loop = $false [switch]$Loop = $false,
[string][Parameter(ValueFromRemainingArguments)]$extraPocketMineArgs
) )
if($php -ne ""){ if($php -ne ""){
@ -23,7 +25,7 @@ if(Test-Path "PocketMine-MP.phar"){
} }
function StartServer{ function StartServer{
$command = "powershell " + $binary + " " + $file + " --enable-ansi" $command = "powershell " + $binary + " " + $file + " --enable-ansi " + $extraPocketMineArgs
iex $command iex $command
} }