mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-11 14:05:35 +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 */
|
/** @var bool */
|
||||||
private $syncFlush = false;
|
private $syncFlush = false;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
private $format = TextFormat::AQUA . "[%s] " . TextFormat::RESET . "%s[%s/%s]: %s" . TextFormat::RESET;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $logFile
|
* @param string $logFile
|
||||||
* @param bool $logDebug
|
* @param bool $logDebug
|
||||||
@ -214,7 +217,7 @@ class MainLogger extends \AttachableThreadedLogger{
|
|||||||
$threadName = (new \ReflectionClass($thread))->getShortName() . " thread";
|
$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);
|
$cleanMessage = TextFormat::clean($message);
|
||||||
|
|
||||||
if(Terminal::hasFormattingCodes()){
|
if(Terminal::hasFormattingCodes()){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user