Handler sending logs to the ChromePHP extension (http://www.chromephp.com/)

This also works out of the box with Firefox 43+

CloneableInstantiable
ExtendsMonolog\Handler\AbstractProcessingHandler
Monolog\Handler\AbstractHandler
Monolog\Handler\Handler
ImplementsMonolog\Handler\FormattableHandlerInterface
Monolog\Handler\HandlerInterface
Monolog\Handler\ProcessableHandlerInterface
Monolog\ResettableInterface
Methods
public __construct( $level = 100, bool $bubble = true)
 


    public Monolog\Handler\Handler::__destruct()
    public Monolog\Handler\Handler::__sleep()
    public Monolog\Handler\Handler::close() : void
     
    {@inheritdoc}

    public Monolog\Handler\AbstractHandler::getBubble() : bool
     
    Gets the bubbling behavior.

    • return bool true means that this handler allows bubbling. false means that bubbling is not permitted.
    public Monolog\Handler\AbstractProcessingHandler::getFormatter() : Monolog\Formatter\FormatterInterface
     
    {@inheritdoc}

    public Monolog\Handler\AbstractHandler::getLevel() : int
     
    Gets minimum logging level at which this handler will be triggered.

    • return int
    public Monolog\Handler\AbstractProcessingHandler::handle(array $record) : bool
     
    {@inheritdoc}

    public handleBatch(array $records) : void
     
    {@inheritdoc}

    public Monolog\Handler\AbstractHandler::isHandling(array $record) : bool
     
    {@inheritdoc}

    public Monolog\Handler\AbstractProcessingHandler::popProcessor() : callable
     
    {@inheritdoc}

    public Monolog\Handler\AbstractProcessingHandler::pushProcessor(callable $callback) : Monolog\Handler\HandlerInterface
     
    {@inheritdoc}

    • suppress PhanTypeMismatchReturn
    public Monolog\Handler\AbstractProcessingHandler::reset()
    public Monolog\Handler\AbstractHandler::setBubble(bool $bubble) : self
     
    Sets the bubbling behavior.

    • return self
    public Monolog\Handler\AbstractProcessingHandler::setFormatter(Monolog\Formatter\FormatterInterface $formatter) : Monolog\Handler\HandlerInterface
     
    {@inheritdoc}

    • suppress PhanTypeMismatchReturn
    public Monolog\Handler\AbstractHandler::setLevel( $level) : self
     
    Sets minimum logging level at which this handler will be triggered.

    • return self
    Constants
    protected Monolog\Handler\ChromePHPHandler::HEADER_NAME = 'X-ChromeLogger-Data'
     
    Header name

    protected Monolog\Handler\ChromePHPHandler::USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'
     
    Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+)

    protected Monolog\Handler\ChromePHPHandler::VERSION = '4.0'
     
    Version of the extension

    Properties
    protected Monolog\Handler\AbstractHandler::$bubble
    protected Monolog\Handler\AbstractProcessingHandler::$formatter
     


    • var FormatterInterface
    protected static $initialized
    protected static $json
    protected Monolog\Handler\AbstractHandler::$level
    protected static $overflowed
     
    Tracks whether we sent too much data

    Chrome limits the headers to 4KB, so when we sent 3KB we stop sending

    • var bool
    protected Monolog\Handler\AbstractProcessingHandler::$processors
     


    • var callable[]
    protected static $sendHeaders
    Methods
    protected getDefaultFormatter() : Monolog\Formatter\FormatterInterface
     
    {@inheritDoc}

    protected headersAccepted() : bool
     
    Verifies if the headers are accepted by the current user agent

    protected isWebRequest() : bool
     
    Checks if PHP's serving a web request

    • return bool
    protected Monolog\Handler\AbstractProcessingHandler::processRecord(array $record) : array
     
    Processes a record.

    protected Monolog\Handler\AbstractProcessingHandler::resetProcessors() : void
    protected send() : void
     
    Sends the log header

    • see \sendHeader()
    protected sendHeader(string $header, string $content) : void
     
    Send header string to the client

    protected write(array $record) : void
     
    Creates & sends header for a record

    • see \sendHeader()
    • see \send()
    Properties
    protected static $initialized
    protected static $json
    protected static $overflowed
     
    Tracks whether we sent too much data

    Chrome limits the headers to 4KB, so when we sent 3KB we stop sending

    • var bool
    protected static $sendHeaders
    © 2020 Bruce Wells
    Search Namespaces \ Classes
    ConfigurationNumbers (0-9.) only