Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
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
Definition
debug.php:7
Bitrix\Landing\Debug\q
static q()
Definition
debug.php:12
Bitrix\Landing\Debug\logToFile
static logToFile(string $message)
Definition
debug.php:44
Bitrix\Landing\Debug\log
static log($itemId, $itemDesc, $typeId='LANDING_LOG')
Definition
debug.php:24
Bitrix\Landing\Manager\isCloudDisable
static isCloudDisable()
Definition
manager.php:1189
Bitrix\Main\ModuleManager
Definition
modulemanager.php:5
Bitrix\Landing
Definition
agent.php:2
modules
landing
lib
debug.php
Создано системой
1.10.0