| Server IP : 68.183.124.220 / Your IP : 216.73.216.141 Web Server : Apache/2.4.18 (Ubuntu) System : Linux Sandbox-A 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64 User : gavin ( 1000) PHP Version : 7.0.33-0ubuntu0.16.04.16 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/wp-content/plugins/wordpress-seo/src/loggers/ |
Upload File : |
<?php
/**
* Yoast extension of the Model class.
*
* @package Yoast\YoastSEO\Loggers
*/
namespace Yoast\WP\Free\Loggers;
use YoastSEO_Vendor\Psr\Log\LoggerInterface;
use YoastSEO_Vendor\Psr\Log\LoggerTrait;
use YoastSEO_Vendor\Psr\Log\NullLogger;
/**
* Creates an instance of a logger object.
*/
class Logger implements LoggerInterface {
use LoggerTrait;
/**
* @var \YoastSEO_Vendor\Psr\Log\LoggerInterface
*/
protected $wrapped_logger;
/**
* Logger constructor.
*/
public function __construct() {
$this->wrapped_logger = new NullLogger();
/**
* Gives the possibility to set override the logger interface.
*
* @api \YoastSEO_Vendor\Psr\Log\LoggerInterface $logger Instance of NullLogger.
*
* @return \YoastSEO_Vendor\Psr\Log\LoggerInterface The logger object.
*/
$this->wrapped_logger = \apply_filters( 'wpseo_logger', $this->wrapped_logger );
}
/**
* Logs with an arbitrary level.
*
* @param mixed $level The log level.
* @param string $message The log message.
* @param array $context The log context.
*
* @return void
*/
public function log( $level, $message, array $context = array() ) {
$this->wrapped_logger->log( $level, $message, $context );
}
}