Collects information for a page request
Records information about database queries, blocks, and execution time and can display it as HTML. It also catches php runtime errors.
Methods | ||||||||
---|---|---|---|---|---|---|---|---|
public
|
__construct()
XoopsLogger::__construct()
XoopsLogger::__construct() |
# | ||||||
public
|
instance()
Deprecated, use getInstance() instead
Deprecated, use getInstance() instead |
# | ||||||
public
static
|
getInstance(): object
Get a reference to the only instance of this class
Get a reference to the only instance of this class ReturnsXoopsLogger reference to the only instance |
# | ||||||
public
|
enableRendering()
Enable logger output rendering
When output rendering is enabled, the logger will insert its output within the pageā¦
Enable logger output rendering When output rendering is enabled, the logger will insert its output within the page content. If the string is found in the page content, the logger output will replace it, otherwise it will be inserted after all the page output. |
# | ||||||
public
|
microtime(): float
Returns the current microtime in seconds.
Returns the current microtime in seconds. |
# | ||||||
public
|
startTime(string $name = 'XOOPS')
Start a timer
Start a timer Parameters
|
# | ||||||
public
|
stopTime(string $name = 'XOOPS')
Stop a timer
Stop a timer Parameters
|
# | ||||||
public
|
addQuery(string $sql, string $error = null, int $errno = null, null $query_time = null)
Log a database query
Log a database query Parameters
|
# | ||||||
public
|
addBlock(string $name, bool $cached = false, int $cachetime = 0)
Log display of a block
Log display of a block Parameters
|
# | ||||||
public
|
addExtra(string $name, int $msg)
Log extra information
Log extra information Parameters
|
# | ||||||
public
|
addDeprecated(string $msg)
Log messages for deprecated functions
Log messages for deprecated functions this was deprecated, but is still in broad use? Parameters
|
# | ||||||
public
|
handleError(integer $errno, string $errstr, string $errfile, string $errline, array|null $trace = null)
Error handling callback (called by the zend engine)
Error handling callback (called by the zend engine) |
# | ||||||
public
|
handleException(Exception|Throwable $e): void
Exception handling callback.
Exception handling callback. Parameters
|
# | ||||||
protected
|
isThrowable(mixed $e): bool
Determine if an object implements Throwable (or is an Exception that would under PHP 7.)
Determine if an object implements Throwable (or is an Exception that would under PHP 7.) Parameters
Returnstrue if related to Throwable or Exception, otherwise false |
# | ||||||
public
|
sanitizePath(string $path): mixed|string
|
# | ||||||
protected
|
sanitizeDbMessage(string $message): string
sanitizeDbMessage
sanitizeDbMessage |
# | ||||||
public
|
render($output): string
Output buffering callback inserting logger dump in page output
Output buffering callback inserting logger dump in page output |
# | ||||||
public
|
dump(string $mode = '')
*#@+
*#@+ |
# | ||||||
public
|
dumpTime(string $name = 'XOOPS', bool $unset = false): float
get the current execution time of a timer
get the current execution time of a timer Parameters
Returnscurrent execution time of the counter |
# | ||||||
public
|
triggerError(int $errkey = 0, string $errStr = '', string $errFile = '', string $errLine = '', int $errNo = 0): void
XoopsLogger::triggerError()
XoopsLogger::triggerError() |
# | ||||||
public
|
dumpAll()
*#@+
*#@+ |
# | ||||||
public
|
dumpBlocks(): dump
dumpBlocks @deprecated
dumpBlocks @deprecated |
# | ||||||
public
|
dumpExtra(): dump
dumpExtra @deprecated
dumpExtra @deprecated |
# | ||||||
public
|
dumpQueries(): mixed
dump Queries @deprecated
dump Queries @deprecated |
# |
Properties | |||
---|---|---|---|
public
|
array
|
$queries = []
|
# |
public
|
|
$blocks = []
|
# |
public
|
|
$extra = []
|
# |
public
|
|
$logstart = []
|
# |
public
|
|
$logend = []
|
# |
public
|
|
$errors = []
|
# |
public
|
|
$deprecated = []
|
# |
public
|
|
$usePopup = false
*#@-
*#@- |
# |
public
|
|
$activated = true
|
# |
public
|
|
$renderingEnabled = false
*@access protected
*@access protected |
# |