Skip to content

MainLogger ​

class · pocketmine\utils\MainLogger · source

Extends AttachableThreadSafeLogger
Implements BufferedLogger

Properties ​

$logDebug protected ​

php
protected bool $logDebug

Methods ​

__construct() ​

php
public function __construct(?string $logFile, bool $useFormattingCodes, string $mainThreadName, \DateTimeZone $timezone, bool $logDebug = false, ?string $logArchiveDir = null)

__destruct() ​

php
public function __destruct()

alert() ​

php
public function alert($message)

buffer() ​

php
public function buffer(\Closure $c) : void

critical() ​

php
public function critical($message)

debug() ​

php
public function debug($message, bool $force = false)

emergency() ​

php
public function emergency($message)

error() ​

php
public function error($message)

getFormat() ​

php
public function getFormat() : string

Returns the current logger format used for console output.

info() ​

php
public function info($message)

log() ​

php
public function log($level, $message)

logException() ​

php
public function logException(\Throwable $e, $trace = null)

notice() ​

php
public function notice($message)

send() protected ​

php
protected function send(string $message, string $level, string $prefix, string $color) : void

setFormat() ​

php
public function setFormat(string $format) : void

Sets the logger format to use for outputting text to the console. It should be an sprintf()able string accepting 5 string arguments:

  • time
  • color
  • thread name
  • prefix (debug, info etc)
  • message

setLogDebug() ​

php
public function setLogDebug(bool $logDebug) : void

shutdownLogWriterThread() ​

php
public function shutdownLogWriterThread() : void

syncFlushBuffer() ​

php
public function syncFlushBuffer() : void

warning() ​

php
public function warning($message)

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.