Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
ceventlogger.php
1
<?php
2
3
namespace
Bitrix\Location\Infrastructure\Service\LoggerService
;
4
5
final
class
CEventLogger
implements
ILogger
6
{
7
public
function
log
(
int
$level,
string
$message,
int
$eventType = 0, array $context = [])
8
{
9
\CEventLog::Add(array(
10
"SEVERITY"
=> $this->getSeverity($level),
11
"AUDIT_TYPE_ID"
=>
"LOCATION_MODULE_EVENT_"
.(
string
)$eventType,
12
"MODULE_ID"
=>
"location"
,
13
"ITEM_ID"
=>
""
,
14
"DESCRIPTION"
=> $message
15
));
16
}
17
18
private
function
getSeverity($logLevel)
19
{
20
if
($logLevel <= 400)
21
{
22
$result =
'ERROR'
;
23
}
24
elseif($logLevel <= 500)
25
{
26
$result =
'WARNING'
;
27
}
28
elseif ($logLevel <= 700)
29
{
30
$result =
'INFO'
;
31
}
32
else
33
{
34
$result =
'DEBUG'
;
35
}
36
return
$result;
37
}
38
}
Bitrix\Location\Infrastructure\Service\LoggerService\CEventLogger
Definition
ceventlogger.php:6
Bitrix\Location\Infrastructure\Service\LoggerService\CEventLogger\log
log(int $level, string $message, int $eventType=0, array $context=[])
Definition
ceventlogger.php:7
Bitrix\Location\Infrastructure\Service\LoggerService\ILogger
Definition
ilogger.php:5
Bitrix\Location\Infrastructure\Service\LoggerService
Definition
ceventlogger.php:3
modules
location
lib
infrastructure
service
loggerservice
ceventlogger.php
Создано системой
1.10.0