WC_Admin_Status::status_logs_file() – Show the log page contents for file log handler.

You appear to be a bot. Output may be restricted

Description

Show the log page contents for file log handler.

Usage

WC_Admin_Status::status_logs_file();

Parameters

Returns

void

Source

File name: woocommerce/includes/admin/class-wc-admin-status.php
Lines:

1 to 17 of 17
  public static function status_logs_file() {
    $logs = self::scan_log_files();

    if ( ! empty( $_REQUEST['log_file'] ) && isset( $logs[ sanitize_title( wp_unslash( $_REQUEST['log_file'] ) ) ] ) ) { // WPCS: input var ok, CSRF ok.
      $viewed_log = $logs[ sanitize_title( wp_unslash( $_REQUEST['log_file'] ) ) ]; // WPCS: input var ok, CSRF ok.
    } elseif ( ! empty( $logs ) ) {
      $viewed_log = current( $logs );
    }

    $handle = ! empty( $viewed_log ) ? self::get_log_file_handle( $viewed_log ) : '';

    if ( ! empty( $_REQUEST['handle'] ) ) { // WPCS: input var ok, CSRF ok.
      self::remove_log();
    }

    include_once __DIR__ . '/views/html-admin-page-status-logs.php';
  }
 

 View on GitHub View on Trac