1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
debug.php
См. документацию.
1
<?php
2
namespace
Bitrix\Landing;
3
4
use Bitrix\Main\ModuleManager;
5
6
class
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
}
Bitrix\Landing\Debug\q
static q()
Определения
debug.php:12
Bitrix\Landing\Debug\logToFile
static logToFile(string $message)
Определения
debug.php:44
Bitrix\Landing\Debug\log
static log($itemId, $itemDesc, $typeId='LANDING_LOG')
Определения
debug.php:24
Bitrix\Landing\Manager\isCloudDisable
static isCloudDisable()
Определения
manager.php:1244
Bitrix\Main\Diag\Debug
Определения
debug.php:6
Bitrix\Main\ModuleManager\isModuleInstalled
static isModuleInstalled($moduleName)
Определения
modulemanager.php:125
AddMessage2Log
AddMessage2Log($text, $module='', $traceDepth=6, $showArgs=false)
Определения
tools.php:3941
$message
$message
Определения
payment.php:8
bitrix
modules
landing
lib
debug.php
Создано системой
1.14.0