Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
DataBaseLogger.php
1
<?php
2
3
namespace
Bitrix\Rest\Tools\Diagnostics
;
4
5
use
Bitrix\Main\Type\Date
;
6
use
Bitrix\Rest\LogTable
;
7
use
Bitrix\Main\Diag\Logger
;
8
13
class
DataBaseLogger
extends
Logger
14
{
15
protected
function
logMessage
(
string
$level
,
string
$message
)
16
{
17
if
(
LoggerManager::getInstance
()->isActive())
18
{
19
LogTable::add(
20
[
21
'CLIENT_ID'
=> Date::createFromTimestamp(time()),
22
'PASSWORD_ID'
=> 0,
23
'SCOPE'
=>
''
,
24
'METHOD'
=>
'logger:'
.
$level
,
25
'REQUEST_METHOD'
=>
''
,
26
'REQUEST_URI'
=>
''
,
27
'REQUEST_AUTH'
=>
''
,
28
'REQUEST_DATA'
=>
''
,
29
'RESPONSE_STATUS'
=> \CHTTP::getLastStatus(),
30
'RESPONSE_DATA'
=>
$message
,
31
]
32
);
33
}
34
}
35
}
Bitrix\Main\Diag\Logger
Definition
logger.php:19
Bitrix\Main\Diag\Logger\$message
string $message
Definition
logger.php:37
Bitrix\Main\Diag\Logger\$level
$level
Definition
logger.php:31
Bitrix\Main\Type\Date
Definition
date.php:9
Bitrix\Rest\LogTable
Definition
log.php:38
Bitrix\Rest\Tools\Diagnostics\DataBaseLogger
Definition
DataBaseLogger.php:14
Bitrix\Rest\Tools\Diagnostics\DataBaseLogger\logMessage
logMessage(string $level, string $message)
Definition
DataBaseLogger.php:15
Bitrix\Rest\Tools\Diagnostics\LoggerManager\getInstance
static getInstance()
Definition
LoggerManager.php:72
Bitrix\Rest\Tools\Diagnostics
Definition
DataBaseLogger.php:3
modules
rest
lib
Tools
Diagnostics
DataBaseLogger.php
Создано системой
1.10.0