XOOPS  2.6.0
MonologLogger Class Reference
Inheritance diagram for MonologLogger:
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 ()
 
 emergency ($message, array $context=array())
 
 enable ()
 
 error ($message, array $context=array())
 
 info ($message, array $context=array())
 
 isEnable ()
 
 log ($level, $message, array $context=array())
 
 notice ($message, array $context=array())
 
 quiet ()
 
 sanitizePath ($path)
 
 setConfigs ($configs)
 
 startTime ($name= 'XOOPS')
 
 stopTime ($name= 'XOOPS')
 
 warning ($message, array $context=array())
 
 xoopsDataProcessor ($record)
 

Static Public Member Functions

static getInstance ()
 

Private Member Functions

 messageTag ($tag, $default)
 

Private Attributes

 $activated = false
 
 $configs = false
 
 $monolog = false
 
 $starttimes = array()
 

Detailed Description

Definition at line 36 of file monologlogger.php.

Constructor & Destructor Documentation

MonologLogger::__construct ( )

constructor

Definition at line 61 of file monologlogger.php.

Member Function Documentation

MonologLogger::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 262 of file monologlogger.php.

References $name, and log().

Here is the call graph for this function:

MonologLogger::addDeprecated (   $msg)

Log messages for deprecated functions

Parameters
string$msgname for the entry
Returns
void

Definition at line 293 of file monologlogger.php.

References $msg, log(), and WARNING.

Here is the call graph for this function:

MonologLogger::addException (   $e)

Log exceptions

Parameters
Exception$ename for the entry
Returns
void

Definition at line 307 of file monologlogger.php.

References error(), messageTag(), and sanitizePath().

Here is the call graph for this function:

MonologLogger::addExtra (   $name,
  $msg 
)

Log extra information

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

Definition at line 278 of file monologlogger.php.

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

Here is the call graph for this function:

MonologLogger::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 236 of file monologlogger.php.

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

Here is the call graph for this function:

MonologLogger::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 365 of file monologlogger.php.

References log().

Here is the call graph for this function:

MonologLogger::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 382 of file monologlogger.php.

References log().

Here is the call graph for this function:

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

PSR-3 Detailed debug information.

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

Definition at line 463 of file monologlogger.php.

References log().

Here is the call graph for this function:

MonologLogger::disable ( )

disable logging

Returns
void

Definition at line 87 of file monologlogger.php.

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

PSR-3 System is unusable.

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

Definition at line 347 of file monologlogger.php.

References log().

Here is the call graph for this function:

MonologLogger::enable ( )

Enable logger output

Returns
void

Definition at line 98 of file monologlogger.php.

References WARNING.

MonologLogger::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 398 of file monologlogger.php.

References log().

Referenced by addException().

Here is the call graph for this function:

Here is the caller graph for this function:

MonologLogger::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 448 of file monologlogger.php.

References log().

Here is the call graph for this function:

MonologLogger::isEnable ( )

report enabled status

Returns
bool

Definition at line 178 of file monologlogger.php.

References $activated.

MonologLogger::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 494 of file monologlogger.php.

References $msg, _MD_MONOLOG_BLOCKS, _MD_MONOLOG_CACHED, _MD_MONOLOG_EXTRA, _MD_MONOLOG_NOT_CACHED, messageTag(), and WARNING.

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

Here is the call graph for this function:

Here is the caller graph for this function:

MonologLogger::messageTag (   $tag,
  $default 
)
private

messageTag returns the value of a language constant if it is defined, or the supplied default if the constant is not defined. This is needed because logging code can run before locale is established.

Parameters
string$tagthe constant name
string$defaulta default value
Returns
string constant or default value

Definition at line 480 of file monologlogger.php.

Referenced by addException(), and log().

Here is the caller graph for this function:

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

PSR-3 Normal but significant events.

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

Definition at line 431 of file monologlogger.php.

References log().

Here is the call graph for this function:

MonologLogger::quiet ( )

disable output for the benefit of ajax scripts

Returns
void

Definition at line 188 of file monologlogger.php.

MonologLogger::sanitizePath (   $path)

sanitizePath

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

Definition at line 329 of file monologlogger.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:

MonologLogger::setConfigs (   $configs)

set configuration items

Parameters
array$configsmodule/user configuration items
Returns
void

Definition at line 168 of file monologlogger.php.

References $configs.

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

Start a timer

Parameters
string$namename of the timer
Returns
void

Definition at line 200 of file monologlogger.php.

References $name.

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

Stop a timer

Parameters
string$namename of the timer
Returns
void

Definition at line 212 of file monologlogger.php.

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

Here is the call graph for this function:

MonologLogger::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 416 of file monologlogger.php.

References log(), and WARNING.

Here is the call graph for this function:

MonologLogger::xoopsDataProcessor (   $record)

adds Xoops specific information to the log record

Parameters
array$recordlog record contents
Returns
void

Definition at line 153 of file monologlogger.php.

References $xoops, and Xoops\getInstance().

Here is the call graph for this function:

Member Data Documentation

MonologLogger::$activated = false
private

Definition at line 46 of file monologlogger.php.

Referenced by isEnable().

MonologLogger::$configs = false
private

Definition at line 56 of file monologlogger.php.

Referenced by setConfigs().

MonologLogger::$monolog = false
private

Definition at line 41 of file monologlogger.php.

MonologLogger::$starttimes = array()
private

Definition at line 51 of file monologlogger.php.


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