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

Public Member Functions

 __construct ()
 
 addBlock ($name, $cached=false, $cachetime=0)
 
 addDeprecated ($msg)
 
 addException ($e)
 
 addExtra ($name, $msg)
 
 addQuery ($sql, $error=null, $errno=null, $query_time=null)
 
 alert ($message, array $context=array())
 
 critical ($message, array $context=array())
 
 debug ($message, array $context=array())
 
 disable ()
 
 dump ($mode= '')
 
 dumpTime ($name= 'XOOPS', $unset=false)
 
 emergency ($message, array $context=array())
 
 enable ()
 
 enableRendering ()
 
 error ($message, array $context=array())
 
 info ($message, array $context=array())
 
 isEnable ()
 
 log ($level, $message, array $context=array())
 
 notice ($message, array $context=array())
 
 quiet ()
 
 render ($output)
 
 sanitizePath ($path)
 
 setConfigs ($configs)
 
 startTime ($name= 'XOOPS')
 
 stopTime ($name= 'XOOPS')
 
 warning ($message, array $context=array())
 

Static Public Member Functions

static getInstance ()
 

Protected Attributes

 $activated = false
 
 $blocks = array()
 
 $configs = false
 
 $deprecated = array()
 
 $errors = array()
 
 $extra = array()
 
 $logend = array()
 
 $logstart = array()
 
 $queries = array()
 
 $renderingEnabled = false
 
 $usePopup = false
 

Private Member Functions

 addToTheme ()
 

Detailed Description

Definition at line 31 of file legacylogger.php.

Constructor & Destructor Documentation

LegacyLogger::__construct ( )

constructor

Definition at line 86 of file legacylogger.php.

Member Function Documentation

LegacyLogger::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 255 of file legacylogger.php.

References $name.

LegacyLogger::addDeprecated (   $msg)

Log messages for deprecated functions

Parameters
string$msgname for the entry
Returns
void

Definition at line 284 of file legacylogger.php.

References $msg.

LegacyLogger::addException (   $e)

Log exceptions

Parameters
Exception$ename for the entry
Returns
void

Definition at line 298 of file legacylogger.php.

References log(), and sanitizePath().

Here is the call graph for this function:

LegacyLogger::addExtra (   $name,
  $msg 
)

Log extra information

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

Definition at line 270 of file legacylogger.php.

References $msg, and $name.

Referenced by dump().

Here is the caller graph for this function:

LegacyLogger::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 237 of file legacylogger.php.

References $error, and $sql.

LegacyLogger::addToTheme ( )
private

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

Returns
void

Definition at line 182 of file legacylogger.php.

References $GLOBALS.

LegacyLogger::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 646 of file legacylogger.php.

References log().

Here is the call graph for this function:

LegacyLogger::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 663 of file legacylogger.php.

References log().

Here is the call graph for this function:

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

PSR-3 Detailed debug information.

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

Definition at line 744 of file legacylogger.php.

References log().

Here is the call graph for this function:

LegacyLogger::disable ( )

disable logging

Returns
void

Definition at line 130 of file legacylogger.php.

LegacyLogger::dumpTime (   $name = 'XOOPS',
  $unset = false 
)

get the current execution time of a timer

Parameters
string$namename of the counter
bool$unsetremoves counter from global log
Returns
float current execution time of the counter

Definition at line 599 of file legacylogger.php.

References $name, and $start.

Referenced by dump().

Here is the caller graph for this function:

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

PSR-3 System is unusable.

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

Definition at line 628 of file legacylogger.php.

References log().

Here is the call graph for this function:

LegacyLogger::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 144 of file legacylogger.php.

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

Here is the call graph for this function:

LegacyLogger::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 338 of file legacylogger.php.

Referenced by enable().

Here is the caller graph for this function:

LegacyLogger::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 679 of file legacylogger.php.

References log().

Here is the call graph for this function:

LegacyLogger::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 729 of file legacylogger.php.

References log().

Here is the call graph for this function:

LegacyLogger::isEnable ( )

report enabled status

Returns
bool

Definition at line 162 of file legacylogger.php.

References $activated.

LegacyLogger::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

Definition at line 760 of file legacylogger.php.

Referenced by addException(), alert(), critical(), debug(), dump(), emergency(), error(), info(), notice(), and warning().

Here is the caller graph for this function:

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

PSR-3 Normal but significant events.

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

Definition at line 712 of file legacylogger.php.

References log().

Here is the call graph for this function:

LegacyLogger::quiet ( )

disable output for the benefit of ajax scripts

Returns
void

Definition at line 172 of file legacylogger.php.

LegacyLogger::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 353 of file legacylogger.php.

References dump().

Here is the call graph for this function:

LegacyLogger::sanitizePath (   $path)

sanitizePath

Parameters
string$pathpath name to sanitize
Returns
string path with top levels removed

Definition at line 316 of file legacylogger.php.

References $path, and XoopsBaseConfig\get().

Referenced by addException().

Here is the call graph for this function:

Here is the caller graph for this function:

LegacyLogger::setConfigs (   $configs)

Save a copy of our config array

Parameters
array$configsarray of module/user config options
Returns
void

Definition at line 120 of file legacylogger.php.

References $configs.

LegacyLogger::startTime (   $name = 'XOOPS')

Start a timer

Parameters
string$namename of the timer
Returns
void

Definition at line 206 of file legacylogger.php.

References $name.

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

Stop a timer

Parameters
string$namename of the timer
Returns
void

Definition at line 220 of file legacylogger.php.

References $name.

LegacyLogger::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 697 of file legacylogger.php.

References log(), and WARNING.

Here is the call graph for this function:

Member Data Documentation

LegacyLogger::$activated = false
protected

Definition at line 76 of file legacylogger.php.

Referenced by isEnable().

LegacyLogger::$blocks = array()
protected

Definition at line 41 of file legacylogger.php.

LegacyLogger::$configs = false
protected

Definition at line 81 of file legacylogger.php.

Referenced by setConfigs().

LegacyLogger::$deprecated = array()
protected

Definition at line 66 of file legacylogger.php.

LegacyLogger::$errors = array()
protected

Definition at line 61 of file legacylogger.php.

LegacyLogger::$extra = array()
protected

Definition at line 46 of file legacylogger.php.

LegacyLogger::$logend = array()
protected

Definition at line 56 of file legacylogger.php.

LegacyLogger::$logstart = array()
protected

Definition at line 51 of file legacylogger.php.

LegacyLogger::$queries = array()
protected

Definition at line 36 of file legacylogger.php.

LegacyLogger::$renderingEnabled = false
protected

Definition at line 71 of file legacylogger.php.

LegacyLogger::$usePopup = false
protected

Definition at line 94 of file legacylogger.php.


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