MainLogger
Extends AttachableThreadSafeLogger
Implements BufferedLogger
Properties
$logDebug protected
php
protected bool $logDebugMethods
__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) : voidcritical()
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() : stringReturns 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) : voidsetFormat()
php
public function setFormat(string $format) : voidSets 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) : voidshutdownLogWriterThread()
php
public function shutdownLogWriterThread() : voidsyncFlushBuffer()
php
public function syncFlushBuffer() : voidwarning()
php
public function warning($message)