\CodeIgniter\Log\HandlersChromeLoggerHandler

Class ChromeLoggerHandler

Allows for logging items to the Chrome console for debugging. Requires the ChromeLogger extension installed in your browser.

Summary

Methods
Properties
Constants
__construct()
canHandle()
handle()
setDateFormat()
sendLogs()
No public properties found
VERSION
format()
$handles
$dateFormat
$backtraceLevel
$json
$header
$levels
N/A
No private methods found
No private properties found
N/A

Constants

VERSION

VERSION = 1.0 : float

Version of this library - for ChromeLogger use.

Properties

$handles

$handles : array

Handles

Type

array

$dateFormat

$dateFormat : string

Date format for logging

Type

string

$backtraceLevel

$backtraceLevel : integer

The number of track frames returned from the backtrace.

Type

integer

$json

$json : array

The final data that is sent to the browser.

Type

array

$header

$header : string

The header used to pass the data.

Type

string

$levels

$levels : array

Maps the log levels to the ChromeLogger types.

Type

array

Methods

__construct()

__construct(array  $config = array()) 

Constructor

Parameters

array $config

canHandle()

canHandle(string  $level) : boolean

Checks whether the Handler will handle logging items of this log Level.

Parameters

string $level

Returns

boolean

handle()

handle(  $level,   $message) : boolean

Handles logging the message.

If the handler returns false, then execution of handlers will stop. Any handlers that have not run, yet, will not be run.

Parameters

$level
$message

Returns

boolean

setDateFormat()

setDateFormat(string  $format) : \CodeIgniter\Log\Handlers\HandlerInterface

Stores the date format to use while logging messages.

Parameters

string $format

Returns

\CodeIgniter\Log\Handlers\HandlerInterface

sendLogs()

sendLogs(\CodeIgniter\HTTP\ResponseInterface  $response = null) 

Attaches the header and the content to the passed in request object.

Parameters

\CodeIgniter\HTTP\ResponseInterface $response

format()

format(  $object) : array

Converts the object to display nicely in the Chrome Logger UI.

Parameters

$object

Returns

array