XOOPS  2.6.0
Xoops\Core\Logger Class Reference
Inheritance diagram for Xoops\Core\Logger:
Inheritance graph

Public Member Functions

 __call ($method, $args)
 
 __get ($var)
 
 __set ($var, $val)
 
 addLogger ($logger)
 
 alert ($message, array $context=array())
 
 critical ($message, array $context=array())
 
 debug ($message, array $context=array())
 
 emergency ($message, array $context=array())
 
 error ($message, array $context=array())
 
 handleError ($errno, $errstr, $errfile, $errline)
 
 handleException ($e)
 
 info ($message, array $context=array())
 
 log ($level, $message, array $context=array())
 
 notice ($message, array $context=array())
 
 quiet ()
 
 sanitizePath ($path)
 
 warning ($message, array $context=array())
 

Static Public Member Functions

static getInstance ()
 

Private Member Functions

 deprecatedMessage ()
 
 reportFatalError ($msg)
 

Private Attributes

 $loggers = array()
 
 $logging_active = false
 

Detailed Description

Definition at line 46 of file Logger.php.

Member Function Documentation

Xoops\Core\Logger::__call (   $method,
  $args 
)

Keep deprecated calls from failing

Parameters
string$methodmethod
string$argsarguments
Returns
void
Deprecated:

Definition at line 452 of file Logger.php.

References Xoops\Core\Logger\deprecatedMessage().

Here is the call graph for this function:

Xoops\Core\Logger::__get (   $var)

Keep deprecated calls from failing

Parameters
string$varproperty
Returns
void
Deprecated:

Definition at line 437 of file Logger.php.

References Xoops\Core\Logger\deprecatedMessage().

Here is the call graph for this function:

Xoops\Core\Logger::__set (   $var,
  $val 
)

Keep deprecated calls from failing

Parameters
string$varproperty
string$valvalue
Returns
void
Deprecated:

Definition at line 418 of file Logger.php.

References $var, Xoops\Core\Logger\deprecatedMessage(), and Xoops\Core\Logger\quiet().

Here is the call graph for this function:

Xoops\Core\Logger::addLogger (   $logger)

add a PSR-3 compatible logger to the chain

Parameters
object$loggera PSR-3 compatible logger object
Returns
void

Definition at line 234 of file Logger.php.

Xoops\Core\Logger::alert (   $message,
array  $context = array() 
)

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 context data for this log entry
Returns
void

Definition at line 266 of file Logger.php.

References Xoops\Core\Logger\log().

Here is the call graph for this function:

Xoops\Core\Logger::critical (   $message,
array  $context = array() 
)

Critical conditions.

Example: Application component unavailable, unexpected exception.

Parameters
string$messagemessage
array$contextarray of context data for this log entry
Returns
void

Definition at line 281 of file Logger.php.

References Xoops\Core\Logger\log().

Here is the call graph for this function:

Xoops\Core\Logger::debug (   $message,
array  $context = array() 
)

Detailed debug information.

Parameters
string$messagemessage
array$contextarray of context data for this log entry
Returns
void

Definition at line 352 of file Logger.php.

References Xoops\Core\Logger\log().

Here is the call graph for this function:

Xoops\Core\Logger::deprecatedMessage ( )
private

issue a deprecated warning

Returns
void

Definition at line 462 of file Logger.php.

References $xoops, and Xoops\getInstance().

Referenced by Xoops\Core\Logger\__call(), Xoops\Core\Logger\__get(), and Xoops\Core\Logger\__set().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Core\Logger::emergency (   $message,
array  $context = array() 
)

System is unusable.

Parameters
string$messagemessage
array$contextarray of context data for this log entry
Returns
void

Definition at line 250 of file Logger.php.

References Xoops\Core\Logger\log().

Here is the call graph for this function:

Xoops\Core\Logger::error (   $message,
array  $context = array() 
)

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

Parameters
string$messagemessage
array$contextarray of context data for this log entry
Returns
void

Definition at line 295 of file Logger.php.

References Xoops\Core\Logger\log().

Here is the call graph for this function:

static Xoops\Core\Logger::getInstance ( )
static

Get the Xoops instance

Returns
Xoops object

Definition at line 68 of file Logger.php.

Xoops\Core\Logger::handleError (   $errno,
  $errstr,
  $errfile,
  $errline 
)

Error handling callback.

This will

Parameters
integer$errnoerror number
string$errstrerror message
string$errfilefile
integer$errlineline number
Returns
void

Definition at line 95 of file Logger.php.

References $msg, _XOOPS_FATAL_BACKTRACE, XoopsLocaleEn_US\E_LOGGER_ERROR, XoopsLocaleEn_US\E_LOGGER_NOTICE, XoopsLocaleEn_US\E_LOGGER_STRICT, XoopsLocaleEn_US\E_LOGGER_UNKNOWN, XoopsLocaleEn_US\E_LOGGER_WARNING, XoopsLocaleEn_US\EF_LOGGER_FILELINE, exit, Xoops\Core\Logger\log(), Xoops\Core\Logger\reportFatalError(), Xoops\Core\Logger\sanitizePath(), and WARNING.

Here is the call graph for this function:

Xoops\Core\Logger::handleException (   $e)

Exception handling callback.

This will

Parameters
Exception$euncaught exception
Returns
never

Definition at line 176 of file Logger.php.

References $msg, and Xoops\Core\Logger\reportFatalError().

Here is the call graph for this function:

Xoops\Core\Logger::info (   $message,
array  $context = array() 
)

Interesting events.

Example: User logs in, SQL logs.

Parameters
string$messagemessage
array$contextarray of context data for this log entry
Returns
void

Definition at line 339 of file Logger.php.

References Xoops\Core\Logger\log().

Here is the call graph for this function:

Xoops\Core\Logger::log (   $level,
  $message,
array  $context = array() 
)

Logs with an arbitrary level.

Parameters
mixed$levelPSR-3 LogLevel constant
string$messagemessage
array$contextarray of context data for this log entry
Returns
void

Definition at line 366 of file Logger.php.

Referenced by Xoops\Core\Logger\alert(), Xoops\Core\Logger\critical(), Xoops\Core\Logger\debug(), Xoops\Core\Logger\emergency(), Xoops\Core\Logger\error(), Xoops\Core\Logger\handleError(), Xoops\Core\Logger\info(), Xoops\Core\Logger\notice(), Xoops\Core\Logger\reportFatalError(), and Xoops\Core\Logger\warning().

Here is the caller graph for this function:

Xoops\Core\Logger::notice (   $message,
array  $context = array() 
)

Normal but significant events.

Parameters
string$messagemessage
array$contextarray of context data for this log entry
Returns
void

Definition at line 324 of file Logger.php.

References Xoops\Core\Logger\log().

Here is the call graph for this function:

Xoops\Core\Logger::quiet ( )

quiet - turn off output if output is rendered in XOOPS page output. This is intended to assist ajax code that may fail with any extra content the logger may introduce.

It should have no effect on loggers using other methods, such a write to file.

Returns
void

Definition at line 391 of file Logger.php.

Referenced by Xoops\Core\Logger\__set().

Here is the caller graph for this function:

Xoops\Core\Logger::reportFatalError (   $msg)
private

Definition at line 182 of file Logger.php.

References $msg, _XOOPS_FATAL_MESSAGE, Xoops\Core\Logger\log(), and Xoops\Core\Logger\sanitizePath().

Referenced by Xoops\Core\Logger\handleError(), and Xoops\Core\Logger\handleException().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Core\Logger::sanitizePath (   $path)

clean a path to remove sensitive details

Parameters
string$pathpath to sanitize
Returns
string sanitized path

Definition at line 200 of file Logger.php.

References $path, and XoopsBaseConfig\get().

Referenced by Xoops\Core\Logger\handleError(), and Xoops\Core\Logger\reportFatalError().

Here is the call graph for this function:

Here is the caller graph for this function:

Xoops\Core\Logger::warning (   $message,
array  $context = array() 
)

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 context data for this log entry
Returns
void

Definition at line 311 of file Logger.php.

References Xoops\Core\Logger\log(), and WARNING.

Here is the call graph for this function:

Member Data Documentation

Xoops\Core\Logger::$loggers = array()
private

Definition at line 51 of file Logger.php.

Xoops\Core\Logger::$logging_active = false
private

Definition at line 56 of file Logger.php.


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