Extract MainLoggerThread unit from MainLogger

MainLogger is no longer a Thread, as per the recent changes to pocketmine/log-pthreads.
This commit is contained in:
Dylan K. Taylor
2021-02-04 16:28:49 +00:00
parent 4b9639f6c9
commit ae75d73f48
13 changed files with 140 additions and 79 deletions

View File

@ -21,13 +21,13 @@
declare(strict_types=1);
if(!defined('LEVELDB_ZLIB_RAW_COMPRESSION')){
if(!\defined('LEVELDB_ZLIB_RAW_COMPRESSION')){
//leveldb might not be loaded
define('LEVELDB_ZLIB_RAW_COMPRESSION', 4);
\define('LEVELDB_ZLIB_RAW_COMPRESSION', 4);
}
if(!extension_loaded('libdeflate')){
if(!\extension_loaded('libdeflate')){
function libdeflate_deflate_compress(string $data, int $level = 6) : string{}
}
//TODO: these need to be defined properly or removed
define('pocketmine\COMPOSER_AUTOLOADER_PATH', dirname(__DIR__, 2) . '/vendor/autoload.php');
\define('pocketmine\COMPOSER_AUTOLOADER_PATH', \dirname(__DIR__, 2) . '/vendor/autoload.php');

View File

@ -283,7 +283,7 @@ parameters:
-
message: "#^Parameter \\#2 \\$str of function fwrite expects string, mixed given\\.$#"
count: 1
path: ../../../src/utils/MainLogger.php
path: ../../../src/utils/MainLoggerThread.php
-
message: "#^Cannot access offset 'status' on mixed\\.$#"