SeasLog::debug
(PECL seaslog >=1.0.0)
SeasLog::debug — Record debug log information
Описание
$message
, array $content
= ?
, string $logger
= ?
) : boolRecord debug log information.
Замечание:
"DEBUG" - Detailed debug information.Fine-grained information events.
Список параметров
-
message
-
The log message.
-
content
-
The `message` contain placeholders which implementors replace with values from content array. Sush as `message` is `log info from {NAME}` and `content` is `array('NAME' => neeke)`, the log information will `log info from neeke`.
-
logger
-
The `logger` cased by the third param would be used right this right now, like a temp logger, when the function SeasLog::setLogger() called in pre content. If `logger` NULL or "", SeasLog will use lastest logger setted by SeasLog::setLogger().
Возвращаемые значения
Return TRUE on record log information success, FALSE on failure.
Примеры
Пример #1 SeasLog::debug() example
<?php
var_dump(SeasLog::debug('log message'));
//with content
var_dump(SeasLog::debug('log message from {NAME}',array('NAME' => 'neeke')));
//with tmp logger
var_dump(SeasLog::debug('log message from {NAME}',array('NAME' => 'neeke'),'tmp_logger'));
var_dump(SeasLog::getBuffer());
?>
Результатом выполнения данного примера будет что-то подобное:
bool(true) bool(true) bool(true) array(2) { ["/var/log/www/default/20180707.log"]=> array(2) { [0]=> string(81) "2018-07-07 11:45:49 | DEBUG | 73263 | 5b40376d1067c | 1530935149.68 | log message " [1]=> string(92) "2018-07-07 11:45:49 | DEBUG | 73263 | 5b40376d1067c | 1530935149.68 | log message from neeke " } ["/var/log/www/tmp_logger/20180707.log"]=> array(1) { [0]=> string(92) "2018-07-07 11:45:49 | DEBUG | 73263 | 5b40376d1067c | 1530935149.68 | log message from neeke " } }
Смотрите также
- seaslog.default_template
- SeasLog::info() - Record info log information
- SeasLog::notice() - Record notice log information
- SeasLog::warning() - Record warning log information
- SeasLog::error() - Record error log information
- SeasLog::critical() - Record critical log information
- SeasLog::alert() - Record alert log information
- SeasLog::emergency() - Record emergency log information
- SeasLog::log() - The Common Record Log Function