\apex\app\sysdebug

Debugger

Service: apex\services\debug

Handles logging all debugger line items, and displaying the ( debug results within the browser when necessary.

This class is available within the services container, meaning its methods can be accessed statically via the service singleton as shown below.

PHP Example

</php

namespace apex;

use apex\app; use apex\services\debug;

// Add debug entry debug::add(2, "Something happened here", FILE, LINE, 'info');

Summary

Methods
Properties
Constants
__construct()
add()
add_sql()
finish_session()
get_backtrace()
get_data()
$data
No constants found
No protected methods found
$start_time
$notes
$trace
$sql
N/A
No private methods found
$log_dir
$date
N/A

Properties

$data

$data : 

Type

$start_time

$start_time : 

Type

$notes

$notes : 

Type

$trace

$trace : 

Type

$sql

$sql : 

Type

$log_dir

$log_dir : 

Type

$date

$date : 

Type

Methods

__construct()

__construct() 

Constructor

add()

add(integer  $level, string  $message, string  $file = '', integer  $line_number, string  $log_level = 'debug', integer  $is_system) 

Add entry to debug session

Parameters

integer $level

Number beterrn 1 -53 defining the level of entry.

string $message

The message to add

string $file

File number (FILE)

integer $line_number

The line number of call (LINE)

string $log_level

Optional, and will add appropriate log item via logger if not debug.

integer $is_system

Defaults to 0, and used by internal error handlers to specify this as coming from PHP interpreter.

add_sql()

add_sql(string  $sql_query) 

Add SQAL query

Parameters

string $sql_query

The SQL query that was executed

finish_session()

finish_session() 

Finish debug session

Finish the session, compileall notes and data gatherered during request, and put them into redis for later display. This is executed by the registry class at the end of each request.

get_backtrace()

get_backtrace(array  $stack = array()) : array

Go through and format the backtrace as necessary for the debug session.

Parameters

array $stack

Optional existing backtrace to format, otherwise gets the backtrace from PHP.

Returns

array —

The formatted backtrace

get_data()

get_data() : array

Get the data array / property

Returns

array —

The data of the debugger session.