Class for debugging, tracing and profiling.
| Properties | |
|---|---|
|
protected
|
Internal variable for storing the log path. |
|
static
private
|
Internal variable for storing the time by profiling. |
|
protected
|
Internal variable for storing the flag that defines whether for each debug output the source file and line number are written from where it is called. |
| Methods | |
|---|---|
|
public
|
Clears the specified log file. |
|
public
|
Clears all log files. |
|
public
|
Logs a message to a standard debug output (logs/debug.log). |
|
public
|
Sets the flag that defines whether the file name and the line number should be written along with the message. |
|
protected
|
Extracts the call stack from the standard PHP backtrace (debug_backtrace). |
|
public
|
Logs a message to a standard profiling output (logs/profile.log) and shows the time elapsed since the last call startProfilePoint or fixProfilePoint. |
|
public
|
Initializes the debug profiler with parameters. |
|
public
|
Logs a message to a standard profiling output (logs/profile.log) and stores the current time. |
|
protected
|
This is an auxiliary function that cuts off the common part of the path. |
Internal variable for storing the log path.
Internal variable for storing the time by profiling.
Internal variable for storing the flag that defines whether for each debug output the source file and line number are written from where it is called.
Clears the specified log file.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $file_name | by value | string |
The target file name. |
Clears all log files.
Logs a message to a standard debug output (logs/debug.log).
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $message | by value | string |
Message to be logged. |
|
| $write_call_stack | by value | bool | false |
Flag that defines where the call stack should be written. |
| $file_name | by value | string | "debug.log" |
The target file name. |
It might throw an exception in the case of any errors:
Sets the flag that defines whether the file name and the line number should be written along with the message.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $state | by value | bool |
the flag that defines whether the file name and the line number should be written along with the message. |
Extracts the call stack from the standard PHP backtrace (debug_backtrace).
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $btrace | by value | array |
The backtrace. |
Returns the extracted call stack.
Logs a message to a standard profiling output (logs/profile.log) and shows the time elapsed since the last call startProfilePoint or fixProfilePoint.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $message | by value | string |
Message to be logged. |
It might throw an exception in the case of any errors:
Initializes the debug profiler with parameters.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $parameters | by value | array |
Settings for logging as an associative array in the form key => value:
|
It might throw an exception in the case of any system errors:
Logs a message to a standard profiling output (logs/profile.log) and stores the current time.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $message | by value | string |
Message to be logged. |
It might throw an exception in the case of any errors:
This is an auxiliary function that cuts off the common part of the path.
| Name | Pass type | Value type | Default value | Description |
|---|---|---|---|---|
| $path | by value | string |
The path. |
Returns the cut path.