XOOPS
2.6.0
|
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() | |
Definition at line 36 of file monologlogger.php.
MonologLogger::__construct | ( | ) |
constructor
Definition at line 61 of file monologlogger.php.
MonologLogger::addBlock | ( | $name, | |
$cached = false , |
|||
$cachetime = 0 |
|||
) |
Log display of a block
string | $name | name of the block |
bool | $cached | was the block cached? |
int | $cachetime | cachetime of the block |
Definition at line 262 of file monologlogger.php.
MonologLogger::addDeprecated | ( | $msg | ) |
Log messages for deprecated functions
string | $msg | name for the entry |
Definition at line 293 of file monologlogger.php.
References $msg, log(), and WARNING.
MonologLogger::addException | ( | $e | ) |
Log exceptions
Exception | $e | name for the entry |
Definition at line 307 of file monologlogger.php.
References error(), messageTag(), and sanitizePath().
MonologLogger::addExtra | ( | $name, | |
$msg | |||
) |
Log extra information
string | $name | name for the entry |
string | $msg | text message for the entry |
Definition at line 278 of file monologlogger.php.
References $msg, $name, and log().
MonologLogger::addQuery | ( | $sql, | |
$error = null , |
|||
$errno = null , |
|||
$query_time = null |
|||
) |
Log a database query
string | $sql | sql that was processed |
string | $error | error message |
int | $errno | error number |
float | $query_time | execution time |
Definition at line 236 of file monologlogger.php.
References $error, $sql, and log().
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.
string | $message | message |
array | $context | array of additional context |
Definition at line 365 of file monologlogger.php.
References log().
MonologLogger::critical | ( | $message, | |
array | $context = array() |
||
) |
PSR-3 Critical conditions.
Example: Application component unavailable, unexpected exception.
string | $message | message |
array | $context | array of additional context |
Definition at line 382 of file monologlogger.php.
References log().
MonologLogger::debug | ( | $message, | |
array | $context = array() |
||
) |
PSR-3 Detailed debug information.
string | $message | message |
array | $context | array of additional context |
Definition at line 463 of file monologlogger.php.
References log().
MonologLogger::disable | ( | ) |
MonologLogger::emergency | ( | $message, | |
array | $context = array() |
||
) |
PSR-3 System is unusable.
string | $message | message |
array | $context | array of additional context |
Definition at line 347 of file monologlogger.php.
References log().
MonologLogger::enable | ( | ) |
Enable logger output
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.
string | $message | message |
array | $context | array of additional context |
Definition at line 398 of file monologlogger.php.
References log().
Referenced by addException().
|
static |
Get a reference to the only instance of this class
Definition at line 71 of file monologlogger.php.
Referenced by MonologPreload\eventCoreDatabaseNoconn(), MonologPreload\eventCoreDatabaseNodb(), MonologPreload\eventCoreDatabaseQueryComplete(), MonologPreload\eventCoreDeprecated(), MonologPreload\eventCoreDisableerrorreporting(), MonologPreload\eventCoreException(), MonologPreload\eventCoreFooterStart(), MonologPreload\eventCoreHeaderEnd(), MonologPreload\eventCoreHeaderStart(), MonologPreload\eventCoreIncludeCommonAuthSuccess(), MonologPreload\eventCoreIncludeCommonEnd(), MonologPreload\eventCoreIncludeCommonSecurity(), MonologPreload\eventCoreModuleAddlog(), MonologPreload\eventCoreSecurityValidatetokenEnd(), MonologPreload\eventCoreThemeblocksBuildblockStart(), MonologPreload\eventCoreThemeCheckcacheSuccess(), MonologPreload\eventCoreThemeRenderEnd(), and MonologPreload\eventCoreThemeRenderStart().
MonologLogger::info | ( | $message, | |
array | $context = array() |
||
) |
PSR-3 Interesting events.
Example: User logs in, SQL logs.
string | $message | message |
array | $context | array of additional context |
Definition at line 448 of file monologlogger.php.
References log().
MonologLogger::isEnable | ( | ) |
report enabled status
Definition at line 178 of file monologlogger.php.
References $activated.
MonologLogger::log | ( | $level, | |
$message, | |||
array | $context = array() |
||
) |
PSR-3 Logs with an arbitrary level.
mixed | $level | logging level |
string | $message | message |
array | $context | array of additional context |
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().
|
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.
string | $tag | the constant name |
string | $default | a default value |
Definition at line 480 of file monologlogger.php.
Referenced by addException(), and log().
MonologLogger::notice | ( | $message, | |
array | $context = array() |
||
) |
PSR-3 Normal but significant events.
string | $message | message |
array | $context | array of additional context |
Definition at line 431 of file monologlogger.php.
References log().
MonologLogger::quiet | ( | ) |
disable output for the benefit of ajax scripts
Definition at line 188 of file monologlogger.php.
MonologLogger::sanitizePath | ( | $path | ) |
sanitizePath
string | $path | path name to sanitize |
Definition at line 329 of file monologlogger.php.
References $path, and XoopsBaseConfig\get().
Referenced by addException().
MonologLogger::setConfigs | ( | $configs | ) |
set configuration items
array | $configs | module/user configuration items |
Definition at line 168 of file monologlogger.php.
References $configs.
MonologLogger::startTime | ( | $name = 'XOOPS' | ) |
Start a timer
string | $name | name of the timer |
Definition at line 200 of file monologlogger.php.
References $name.
MonologLogger::stopTime | ( | $name = 'XOOPS' | ) |
Stop a timer
string | $name | name of the timer |
Definition at line 212 of file monologlogger.php.
References $msg, $name, _MD_MONOLOG_TIMETOLOAD, and log().
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.
string | $message | message |
array | $context | array of additional context |
Definition at line 416 of file monologlogger.php.
References log(), and WARNING.
MonologLogger::xoopsDataProcessor | ( | $record | ) |
adds Xoops specific information to the log record
array | $record | log record contents |
Definition at line 153 of file monologlogger.php.
References $xoops, and Xoops\getInstance().
|
private |
Definition at line 46 of file monologlogger.php.
Referenced by isEnable().
|
private |
Definition at line 56 of file monologlogger.php.
Referenced by setConfigs().
|
private |
Definition at line 41 of file monologlogger.php.
|
private |
Definition at line 51 of file monologlogger.php.