mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 00:25:04 +00:00
MainLogger: Require useFormattingCodes as a constructor parameter
this avoids needing to call Terminal::init() before starting a MainLogger. Since it inits the formatting codes anyway when log messages are first recorded, it shouldn't be necessary to pre-initialize it.
This commit is contained in:
@ -42,9 +42,8 @@ class AsyncPoolTest extends TestCase{
|
||||
private $mainLogger;
|
||||
|
||||
public function setUp() : void{
|
||||
Terminal::init();
|
||||
@define('pocketmine\\COMPOSER_AUTOLOADER_PATH', dirname(__DIR__, 3) . '/vendor/autoload.php');
|
||||
$this->mainLogger = new MainLogger(tempnam(sys_get_temp_dir(), "pmlog"));
|
||||
$this->mainLogger = new MainLogger(tempnam(sys_get_temp_dir(), "pmlog"), false);
|
||||
$this->pool = new AsyncPool(2, 1024, new \BaseClassLoader(), $this->mainLogger, new SleeperHandler());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user