HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: /home/mirz4654/www/wp-content/plugins/wp-rocket/inc/classes/logger/class-html-formatter.php
<?php
namespace WP_Rocket\Logger;

use Monolog\Formatter\HtmlFormatter;

defined( 'ABSPATH' ) || die( 'Cheatin&#8217; uh?' );

/**
 * Class used to format log records as HTML.
 *
 * @since  3.2
 * @author Grégory Viguier
 */
class HTML_Formatter extends HtmlFormatter {

	/**
	 * Formats a log record.
	 * Compared to the parent method, it removes the "channel" row.
	 *
	 * @since  3.2
	 * @access public
	 * @author Grégory Viguier
	 *
	 * @param  array $record A record to format.
	 * @return mixed         The formatted record.
	 */
	public function format( array $record ) {
		$output  = $this->addTitle( $record['level_name'], $record['level'] );
		$output .= '<table cellspacing="1" width="100%" class="monolog-output">';

		$output .= $this->addRow( 'Message', (string) $record['message'] );
		$output .= $this->addRow( 'Time', $record['datetime']->format( $this->dateFormat ) );

		if ( $record['context'] ) {
			$embedded_table = '<table cellspacing="1" width="100%">';

			foreach ( $record['context'] as $key => $value ) {
				$embedded_table .= $this->addRow( $key, $this->convertToString( $value ) );
			}

			$embedded_table .= '</table>';
			$output         .= $this->addRow( 'Context', $embedded_table, false );
		}

		if ( $record['extra'] ) {
			$embedded_table = '<table cellspacing="1" width="100%">';

			foreach ( $record['extra'] as $key => $value ) {
				$embedded_table .= $this->addRow( $key, $this->convertToString( $value ) );
			}

			$embedded_table .= '</table>';
			$output         .= $this->addRow( 'Extra', $embedded_table, false );
		}

		return $output . '</table>';
	}
}