Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/wordpres.../src/loggers
File: logger.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Loggers;
[2] Fix | Delete
[3] Fix | Delete
use YoastSEO_Vendor\Psr\Log\LoggerInterface;
[4] Fix | Delete
use YoastSEO_Vendor\Psr\Log\LoggerTrait;
[5] Fix | Delete
use YoastSEO_Vendor\Psr\Log\NullLogger;
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* Our logger class.
[9] Fix | Delete
*/
[10] Fix | Delete
class Logger implements LoggerInterface {
[11] Fix | Delete
[12] Fix | Delete
use LoggerTrait;
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* The logger object.
[16] Fix | Delete
*
[17] Fix | Delete
* @var LoggerInterface
[18] Fix | Delete
*/
[19] Fix | Delete
protected $wrapped_logger;
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* Logger constructor.
[23] Fix | Delete
*/
[24] Fix | Delete
public function __construct() {
[25] Fix | Delete
$this->wrapped_logger = new NullLogger();
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Gives the possibility to set override the logger interface.
[29] Fix | Delete
*
[30] Fix | Delete
* @api \YoastSEO_Vendor\Psr\Log\LoggerInterface $logger Instance of NullLogger.
[31] Fix | Delete
*
[32] Fix | Delete
* @return LoggerInterface The logger object.
[33] Fix | Delete
*/
[34] Fix | Delete
$this->wrapped_logger = \apply_filters( 'wpseo_logger', $this->wrapped_logger );
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Logs with an arbitrary level.
[39] Fix | Delete
*
[40] Fix | Delete
* @param mixed $level The log level.
[41] Fix | Delete
* @param string $message The log message.
[42] Fix | Delete
* @param array $context The log context.
[43] Fix | Delete
*
[44] Fix | Delete
* @return void
[45] Fix | Delete
*/
[46] Fix | Delete
public function log( $level, $message, array $context = [] ) {
[47] Fix | Delete
$this->wrapped_logger->log( $level, $message, $context );
[48] Fix | Delete
}
[49] Fix | Delete
}
[50] Fix | Delete
[51] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function