1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
debug.php
См. документацию.
1<?php
2namespace Bitrix\Landing;
3
4use Bitrix\Main\ModuleManager;
5
6class Debug
7{
12 public static function q()
13 {
14 return \Bitrix\Main\Entity\Query::getLastQuery();
15 }
16
24 public static function log($itemId, $itemDesc, $typeId = 'LANDING_LOG')
25 {
26 if (is_array($itemDesc))
27 {
28 $itemDesc = print_r($itemDesc, true);
29 }
30 \CEventLog::add([
31 'SEVERITY' => 'NOTICE',
32 'AUDIT_TYPE_ID' => $typeId,
33 'MODULE_ID' => 'landing',
34 'ITEM_ID' => $itemId,
35 'DESCRIPTION' => $itemDesc
36 ]);
37 }
38
44 public static function logToFile(string $message): void
45 {
46 static $write = null;
47
48 if ($write === null)
49 {
50 $write = defined('LANDING_FILE_WORK_LOG_TO_FILE') && LANDING_FILE_WORK_LOG_TO_FILE === true;
51
52 if (!$write && ModuleManager::isModuleInstalled('bitrix24') && !Manager::isCloudDisable())
53 {
54 $write = true;
55 }
56 }
57
58 if ($write)
59 {
60 AddMessage2Log($message, 'landing', 7);
61 }
62 }
63}
static q()
Определения debug.php:12
static logToFile(string $message)
Определения debug.php:44
static log($itemId, $itemDesc, $typeId='LANDING_LOG')
Определения debug.php:24
static isCloudDisable()
Определения manager.php:1244
Определения debug.php:6
static isModuleInstalled($moduleName)
Определения modulemanager.php:125
AddMessage2Log($text, $module='', $traceDepth=6, $showArgs=false)
Определения tools.php:3941
$message
Определения payment.php:8