__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
/**
* A message logger for the Jetpack Sitemap module.
*
* @package automattic/jetpack
* @since 4.8.0
*/
/**
* Handles logging errors and debug messages for sitemap generator.
*
* A Jetpack_Sitemap_Logger object keeps track of its birth time as well
* as a "unique" ID string. Calling the report() method writes a message
* to the PHP error log as well as the ID string for easier grepping.
*
* @since 4.8.0
*/
class Jetpack_Sitemap_Logger {
/**
* A unique-ish string for each logger, enabling us to grep
* for the messages written by an individual generation phase.
*
* @access private
* @since 4.8.0
* @var string $key The key string.
*/
private $key;
/**
* The birth time of this object in microseconds.
*
* @access private
* @since 4.8.0
* @var int $starttime The birth time.
*/
private $starttime;
/**
* Initializes a new logger object.
*
* @access public
* @since 4.8.0
*
* @param string $message An optional message string to be written to the debug log on initialization.
*/
public function __construct( $message = null ) {
$this->key = wp_generate_password( 5, false );
$this->starttime = microtime( true );
if ( $message !== null ) {
$this->report( $message );
}
}
/**
* Writes a string to the debug log, including the logger's ID string.
*
* @access public
* @since 4.8.0
*
* @param string $message The string to be written to the log.
* @param boolean $is_error If true, $message will be logged even if JETPACK_DEV_DEBUG is not enabled.
*/
public function report( $message, $is_error = false ) {
$message = 'jp-sitemap-' . $this->key . ': ' . $message;
if ( ! ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ) {
return;
}
if ( ! $is_error && ! ( defined( 'JETPACK_DEV_DEBUG' ) && JETPACK_DEV_DEBUG ) ) {
return;
}
error_log( $message ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log
}
/**
* Writes the elapsed lifetime of the logger to the debug log, with an optional message.
*
* @access public
* @since 4.8.0
*
* @param string $message The optional message string. Default is the empty string.
*/
public function time( $message = '' ) {
$time = round( microtime( true ) - $this->starttime, 3 );
$this->report( $message . ' ' . $time . ' seconds elapsed.' );
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| sitemap-buffer-fallback.php | File | 4.04 KB | 0644 |
|
| sitemap-buffer-image-fallback.php | File | 1.95 KB | 0644 |
|
| sitemap-buffer-image.php | File | 2.57 KB | 0644 |
|
| sitemap-buffer-master-fallback.php | File | 1.32 KB | 0644 |
|
| sitemap-buffer-master.php | File | 1.9 KB | 0644 |
|
| sitemap-buffer-news-fallback.php | File | 1.97 KB | 0644 |
|
| sitemap-buffer-news.php | File | 2.58 KB | 0644 |
|
| sitemap-buffer-page-fallback.php | File | 1.88 KB | 0644 |
|
| sitemap-buffer-page.php | File | 2.5 KB | 0644 |
|
| sitemap-buffer-video-fallback.php | File | 1.96 KB | 0644 |
|
| sitemap-buffer-video.php | File | 2.57 KB | 0644 |
|
| sitemap-buffer.php | File | 8.01 KB | 0644 |
|
| sitemap-builder.php | File | 39.82 KB | 0644 |
|
| sitemap-constants.php | File | 5.66 KB | 0644 |
|
| sitemap-finder.php | File | 2.95 KB | 0644 |
|
| sitemap-librarian.php | File | 11.59 KB | 0644 |
|
| sitemap-logger.php | File | 2.34 KB | 0644 |
|
| sitemap-state.php | File | 4.23 KB | 0644 |
|
| sitemap-stylist.php | File | 20.49 KB | 0644 |
|
| sitemaps.php | File | 17.92 KB | 0644 |
|