mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-26 21:03:45 +00:00
Added automatic reporting
This commit is contained in:
parent
7b45df680e
commit
9d75baf212
@ -1784,8 +1784,24 @@ class Server{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ini_set("memory_limit", "-1"); //Fix error dump not dumped on memory problems
|
ini_set("memory_limit", "-1"); //Fix error dump not dumped on memory problems
|
||||||
$this->logger->emergency("An unrecoverable has occurred and the server has crashed. Creating an error dump");
|
$this->logger->emergency("An unrecoverable has occurred and the server has crashed. Creating a crash dump");
|
||||||
$dump = new CrashDump($this);
|
$dump = new CrashDump($this);
|
||||||
|
|
||||||
|
if($this->getProperty("settings.send-crash", true) !== false){
|
||||||
|
$reply = Utils::postURL("http://crash.pocketmine.net/submit/api", [
|
||||||
|
"report" => "yes",
|
||||||
|
"name" => "PocketMine-MP ".$this->getPocketMineVersion(),
|
||||||
|
"email" => "crash@pocketmine.net",
|
||||||
|
"reportPaste" => base64_encode($dump->getEncodedData())
|
||||||
|
]);
|
||||||
|
|
||||||
|
if(($data = json_decode($reply)) !== false and isset($data->crashId)){
|
||||||
|
$reportId = $data->crashId;
|
||||||
|
$reportUrl = $data->crashUrl;
|
||||||
|
$this->logger->emergency("The crash dump has ben automatically submitted to the Crash Archive. You can view it on $reportUrl or use the ID #$reportId.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->logger->emergency("Please submit the \"".$dump->getPath()."\" file to the Bug Reporting page. Give as much info as you can.");
|
$this->logger->emergency("Please submit the \"".$dump->getPath()."\" file to the Bug Reporting page. Give as much info as you can.");
|
||||||
|
|
||||||
//$this->checkMemory();
|
//$this->checkMemory();
|
||||||
|
@ -10,6 +10,7 @@ settings:
|
|||||||
advanced-cache: false
|
advanced-cache: false
|
||||||
upnp-forwarding: false
|
upnp-forwarding: false
|
||||||
send-usage: true
|
send-usage: true
|
||||||
|
send-crash: true
|
||||||
async-workers: 4
|
async-workers: 4
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user