1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
eventlogger.php
См. документацию.
1<?php
2
9
10namespace Bitrix\Main\Diag;
11
12class EventLogger extends Logger
13{
14 protected $module;
15 protected $auditType;
16 protected $callback;
17
23 public function __construct(string $module = null, string $auditType = null, callable $callback = null)
24 {
25 $this->module = $module;
26 $this->auditType = $auditType;
27 $this->callback = $callback;
28 }
29
30 protected function logMessage(string $level, string $message)
31 {
32 if (is_callable($this->callback))
33 {
34 $info = call_user_func($this->callback, $this->context, $this->message);
35 }
36
38 'SEVERITY' => $info['SEVERITY'] ?? strtoupper($level),
39 'AUDIT_TYPE_ID' => $info['AUDIT_TYPE_ID'] ?? $this->auditType,
40 'MODULE_ID' => $info['MODULE_ID'] ?? $this->module,
41 'ITEM_ID' => $info['ITEM_ID'] ?? '',
42 'DESCRIPTION' => $info['DESCRIPTION'] ?? $message
43 ]);
44 }
45}
logMessage(string $level, string $message)
Определения eventlogger.php:30
__construct(string $module=null, string $auditType=null, callable $callback=null)
Определения eventlogger.php:23
string $message
Определения logger.php:36
$level
Определения logger.php:30
static Add($arFields)
Определения event_log.php:44
if($NS['step']==6) if( $NS[ 'step']==7) if(COption::GetOptionInt('main', 'disk_space', 0) > 0) $info
Определения backup.php:924
case callback
Определения wrapper_popup.php:31