403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/landing/lib/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/landing/lib/debug.php
<?php
namespace Bitrix\Landing;

use Bitrix\Main\ModuleManager;

class Debug
{
	/**
	 * Gets last query in ORM.
	 * @return string
	 */
	public static function q()
	{
		return \Bitrix\Main\Entity\Query::getLastQuery();
	}

	/**
	 * Logging in system log.
	 * @param string $itemId Log item id.
	 * @param mixed $itemDesc Log item description.
	 * @param string $typeId Log type id.
	 * @return void
	 */
	public static function log($itemId, $itemDesc, $typeId = 'LANDING_LOG')
	{
		if (is_array($itemDesc))
		{
			$itemDesc = print_r($itemDesc, true);
		}
		\CEventLog::add([
			'SEVERITY' => 'NOTICE',
			'AUDIT_TYPE_ID' => $typeId,
			'MODULE_ID' => 'landing',
			'ITEM_ID' => $itemId,
			'DESCRIPTION' => $itemDesc
		]);
	}

	/**
	 * Writes message to log file if permitted.
	 * @param string $message Message.
	 * @return void
	 */
	public static function logToFile(string $message): void
	{
		static $write = null;

		if ($write === null)
		{
			$write = defined('LANDING_FILE_WORK_LOG_TO_FILE') && LANDING_FILE_WORK_LOG_TO_FILE === true;

			if (!$write && ModuleManager::isModuleInstalled('bitrix24') && !Manager::isCloudDisable())
			{
				$write = true;
			}
		}

		if ($write)
		{
			AddMessage2Log($message, 'landing', 7);
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit