Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/php/7.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Sep 9, 2017
2 parents c46caa3 + 7f5d8cc commit 3b96896
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/pocketmine/PocketMine.php
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ function cleanPath($path){


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();
Expand Down
6 changes: 3 additions & 3 deletions src/pocketmine/utils/MainLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ public function info($message){
$this->send($message, \LogLevel::INFO, "INFO", TextFormat::WHITE);
}

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

Expand Down
8 changes: 5 additions & 3 deletions start.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
param (
[CmdletBinding(PositionalBinding=$false)]
param (
[string]$php = "",
[switch]$Loop = $false
[switch]$Loop = $false,
[string][Parameter(ValueFromRemainingArguments)]$extraPocketMineArgs
)

if($php -ne ""){
Expand All @@ -23,7 +25,7 @@ if(Test-Path "PocketMine-MP.phar"){
}

function StartServer{
$command = "powershell " + $binary + " " + $file + " --enable-ansi"
$command = "powershell " + $binary + " " + $file + " --enable-ansi " + $extraPocketMineArgs
iex $command
}

Expand Down

0 comments on commit 3b96896

Please sign in to comment.