HEX
Server: Apache/2.4.41 (Amazon) OpenSSL/1.0.2k-fips PHP/5.6.40
System: Linux ip-172-31-40-18 4.14.146-93.123.amzn1.x86_64 #1 SMP Tue Sep 24 00:45:23 UTC 2019 x86_64
User: apache (48)
PHP: 5.6.40
Disabled: NONE
Upload Files
File: /var/www/html/qcr24/wp-content/plugins/litespeed-cache/tpl/toolbox/log_viewer.tpl.php
<?php
namespace LiteSpeed;
defined( 'WPINC' ) || exit;
?>

<h3 class="litespeed-title">
	<?php echo __('Debug Log', 'litespeed-cache'); ?>
	<?php Doc::learn_more( 'https://docs.litespeedtech.com/lscache/lscwp/toolbox/#log-view-tab' ); ?>

	<a href="<?php echo Utility::build_url( Router::ACTION_DEBUG2, Debug2::TYPE_CLEAR_LOG ); ?>" class="button button-primary" litespeed-accesskey='D'>
		<?php echo __( 'Clear Log', 'litespeed-cache' ); ?>
	</a>
</h3>


<?php
	$file = LSCWP_CONTENT_DIR . '/debug.log';
	$lines = File::count_lines( $file );
	$start = $lines > 1000 ? $lines - 1000 : 0;
	$logs = File::read( $file, $start );
	$logs = $logs ? implode( "\n", $logs ) : '';

	echo nl2br( htmlspecialchars( $logs ) );
?>


	<a href="<?php echo Utility::build_url( Router::ACTION_DEBUG2, Debug2::TYPE_CLEAR_LOG ); ?>" class="button button-primary">
		<?php echo __( 'Clear Log', 'litespeed-cache' ); ?>
	</a>