mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
MainLogger: moved format to private variable
This commit is contained in:
parent
dd11bcaf11
commit
05f4262e81
@ -42,6 +42,9 @@ class MainLogger extends \AttachableThreadedLogger{
|
||||
/** @var bool */
|
||||
private $syncFlush = false;
|
||||
|
||||
/** @var string */
|
||||
private $format = TextFormat::AQUA . "[%s] " . TextFormat::RESET . "%s[%s/%s]: %s" . TextFormat::RESET;
|
||||
|
||||
/**
|
||||
* @param string $logFile
|
||||
* @param bool $logDebug
|
||||
@ -214,7 +217,7 @@ class MainLogger extends \AttachableThreadedLogger{
|
||||
$threadName = (new \ReflectionClass($thread))->getShortName() . " thread";
|
||||
}
|
||||
|
||||
$message = TextFormat::AQUA . "[" . date("H:i:s", $now) . "] " . TextFormat::RESET . $color . "[" . $threadName . "/" . $prefix . "]:" . " " . $message . TextFormat::RESET;
|
||||
$message = sprintf($this->format, date("H:i:s", $now), $color, $threadName, $prefix, $message);
|
||||
$cleanMessage = TextFormat::clean($message);
|
||||
|
||||
if(Terminal::hasFormattingCodes()){
|
||||
|
Loading…
x
Reference in New Issue
Block a user