XOOPS  2.6.0
DebugbarLogger Class Reference
Inheritance diagram for DebugbarLogger:
Inheritance graph

Public Member Functions

 __construct ()
 
 __destruct ()
 
 addBlock ($name, $cached=false, $cachetime=0)
 
 addDeprecated ($msg)
 
 addException ($e)
 
 addExtra ($name, $msg)
 
 addQuery ($sql, $error=null, $errno=null, $query_time=null)
 
 addSmarty ()
 
 alert ($message, array $context=array())
 
 critical ($message, array $context=array())
 
 debug ($message, array $context=array())
 
 disable ()
 
 dump ($var)
 
 emergency ($message, array $context=array())
 
 enable ()
 
 enableRendering ()
 
 error ($message, array $context=array())
 
 getDebugbar ()
 
 info ($message, array $context=array())
 
 isEnable ()
 
 log ($level, $message, array $context=array())
 
 notice ($message, array $context=array())
 
 quiet ()
 
 render ($output)
 
 stackData ()
 
 startTime ($name= 'XOOPS', $label=null)
 
 stopTime ($name= 'XOOPS')
 
 warning ($message, array $context=array())
 

Static Public Member Functions

static getInstance ()
 

Private Member Functions

 addToTheme ()
 

Private Attributes

 $activated = false
 
 $debugbar = false
 
 $quietmode = false
 
 $renderer = false
 

Detailed Description

Definition at line 32 of file debugbarlogger.php.

Constructor & Destructor Documentation

DebugbarLogger::__construct ( )

constructor

Definition at line 57 of file debugbarlogger.php.

DebugbarLogger::__destruct ( )

dump everything we have

Definition at line 443 of file debugbarlogger.php.

References $_SERVER, _MD_DEBUGBAR_INCLUDED_FILES, _MD_DEBUGBAR_PHP_VERSION, addExtra(), addToTheme(), and Xmf\Debug\dumpQueuedTimers().

Here is the call graph for this function:

Member Function Documentation

DebugbarLogger::addBlock (   $name,
  $cached = false,
  $cachetime = 0 
)

Log display of a block

Parameters
string$namename of the block
bool$cachedwas the block cached?
int$cachetimecachetime of the block
Returns
void

Definition at line 292 of file debugbarlogger.php.

References $name, and log().

Here is the call graph for this function:

DebugbarLogger::addDeprecated (   $msg)

Log messages for deprecated functions

Parameters
string$msgname for the entry
Returns
void

Definition at line 323 of file debugbarlogger.php.

References $msg, log(), and WARNING.

Here is the call graph for this function:

DebugbarLogger::addException (   $e)

Log exceptions

Parameters
Exception$ename for the entry
Returns
void

Definition at line 337 of file debugbarlogger.php.

Referenced by startTime(), and stopTime().

Here is the caller graph for this function:

DebugbarLogger::addExtra (   $name,
  $msg 
)

Log extra information

Parameters
string$namename for the entry
string$msgtext message for the entry
Returns
void

Definition at line 308 of file debugbarlogger.php.

References $msg, $name, and log().

Referenced by __destruct().

Here is the call graph for this function:

Here is the caller graph for this function:

DebugbarLogger::addQuery (   $sql,
  $error = null,
  $errno = null,
  $query_time = null 
)

Log a database query

Parameters
string$sqlsql that was processed
string$errorerror message
int$errnoerror number
float$query_timeexecution time
Returns
void

Definition at line 266 of file debugbarlogger.php.

References $error, $sql, and log().

Here is the call graph for this function:

DebugbarLogger::addSmarty ( )

Dump Smarty variables

Returns
void

Definition at line 349 of file debugbarlogger.php.

References Xoops\getInstance().

Here is the call graph for this function:

DebugbarLogger::addToTheme ( )
private

Add our resources to the theme as soon as it is available, otherwise return

Returns
void

Definition at line 159 of file debugbarlogger.php.

References $GLOBALS, $xoops, and Xoops\getInstance().

Referenced by __destruct(), enable(), and stopTime().

Here is the call graph for this function:

Here is the caller graph for this function:

DebugbarLogger::alert (   $message,
array  $context = array() 
)

PSR-3 Action must be taken immediately.

Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.

Parameters
string$messagemessage
array$contextarray of additional context
Returns
null

Definition at line 497 of file debugbarlogger.php.

References log().

Here is the call graph for this function:

DebugbarLogger::critical (   $message,
array  $context = array() 
)

PSR-3 Critical conditions.

Example: Application component unavailable, unexpected exception.

Parameters
string$messagemessage
array$contextarray of additional context
Returns
null

Definition at line 514 of file debugbarlogger.php.

References log().

Here is the call graph for this function:

DebugbarLogger::debug (   $message,
array  $context = array() 
)

PSR-3 Detailed debug information.

Parameters
string$messagemessage
array$contextarray of additional context
Returns
null

Definition at line 595 of file debugbarlogger.php.

References log().

Here is the call graph for this function:

DebugbarLogger::disable ( )

disable logging

Returns
void

Definition at line 93 of file debugbarlogger.php.

DebugbarLogger::dump (   $var)

Dump a variable to the messages pane

Parameters
mixed$varvariable to dump
Returns
void

Definition at line 379 of file debugbarlogger.php.

References $var, and log().

Here is the call graph for this function:

DebugbarLogger::emergency (   $message,
array  $context = array() 
)

PSR-3 System is unusable.

Parameters
string$messagemessage
array$contextarray of additional context
Returns
null

Definition at line 479 of file debugbarlogger.php.

References log().

Here is the call graph for this function:

DebugbarLogger::enable ( )

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.

Returns
void

Definition at line 107 of file debugbarlogger.php.

References $xoops, addToTheme(), enableRendering(), and Xoops\getInstance().

Here is the call graph for this function:

DebugbarLogger::enableRendering ( )

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.

Returns
void

Definition at line 406 of file debugbarlogger.php.

Referenced by enable().

Here is the caller graph for this function:

DebugbarLogger::error (   $message,
array  $context = array() 
)

PSR-3 Runtime errors that do not require immediate action but should typically be logged and monitored.

Parameters
string$messagemessage
array$contextarray of additional context
Returns
null

Definition at line 530 of file debugbarlogger.php.

References log().

Here is the call graph for this function:

DebugbarLogger::getDebugbar ( )

Get our debugbar object

Returns

Definition at line 83 of file debugbarlogger.php.

References $debugbar.

DebugbarLogger::info (   $message,
array  $context = array() 
)

PSR-3 Interesting events.

Example: User logs in, SQL logs.

Parameters
string$messagemessage
array$contextarray of additional context
Returns
null

Definition at line 580 of file debugbarlogger.php.

References log().

Here is the call graph for this function:

DebugbarLogger::isEnable ( )

report enabled status

Returns
bool

Definition at line 138 of file debugbarlogger.php.

References $activated.

DebugbarLogger::log (   $level,
  $message,
array  $context = array() 
)

PSR-3 Logs with an arbitrary level.

Parameters
mixed$levellogging level
string$messagemessage
array$contextarray of additional context
Returns
null

If we have embedded channel in the context array, format the message approriatly using context values.

Definition at line 611 of file debugbarlogger.php.

References $msg, _MD_DEBUGBAR_CACHED, _MD_DEBUGBAR_NOT_CACHED, and WARNING.

Referenced by addBlock(), addDeprecated(), addExtra(), addQuery(), alert(), critical(), debug(), dump(), emergency(), error(), info(), notice(), and warning().

Here is the caller graph for this function:

DebugbarLogger::notice (   $message,
array  $context = array() 
)

PSR-3 Normal but significant events.

Parameters
string$messagemessage
array$contextarray of additional context
Returns
null

Definition at line 563 of file debugbarlogger.php.

References log().

Here is the call graph for this function:

DebugbarLogger::quiet ( )

disable output for the benefit of ajax scripts

Returns
void

Definition at line 148 of file debugbarlogger.php.

DebugbarLogger::render (   $output)

Output buffering callback inserting logger dump in page output

Parameters
string$outputoutput buffer to add logger rendering to
Returns
string output

Definition at line 418 of file debugbarlogger.php.

References $xoops, and Xoops\getInstance().

Here is the call graph for this function:

DebugbarLogger::stackData ( )

stackData - stash log data before a redirect

Returns
void

Definition at line 389 of file debugbarlogger.php.

DebugbarLogger::startTime (   $name = 'XOOPS',
  $label = null 
)

Start a timer

Parameters
string$namename of the timer
string | null$labeloptional label for this timer
Returns
void

Definition at line 225 of file debugbarlogger.php.

References $name, and addException().

Here is the call graph for this function:

DebugbarLogger::stopTime (   $name = 'XOOPS')

Stop a timer

Parameters
string$namename of the timer
Returns
void

Definition at line 243 of file debugbarlogger.php.

References $name, addException(), and addToTheme().

Here is the call graph for this function:

DebugbarLogger::warning (   $message,
array  $context = array() 
)

PSR-3 Exceptional occurrences that are not errors.

Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

Parameters
string$messagemessage
array$contextarray of additional context
Returns
null

Definition at line 548 of file debugbarlogger.php.

References log(), and WARNING.

Here is the call graph for this function:

Member Data Documentation

DebugbarLogger::$activated = false
private

Definition at line 47 of file debugbarlogger.php.

Referenced by isEnable().

DebugbarLogger::$debugbar = false
private

Definition at line 37 of file debugbarlogger.php.

Referenced by getDebugbar().

DebugbarLogger::$quietmode = false
private

Definition at line 52 of file debugbarlogger.php.

DebugbarLogger::$renderer = false
private

Definition at line 42 of file debugbarlogger.php.


The documentation for this class was generated from the following file: