WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
класс не описан

Yoast\WP\SEO\Loggers

Logger{} Yoast 1.0

Our logger class.

Хуки из класса
Возвращает

Null. Ничего.

Использование

$Logger = new Logger();
// use class methods

Методы

  1. __construct()
  2. log( $level, $message, array $context = [] )

Код Logger{} Yoast 15.6.2

<?php
class Logger implements LoggerInterface {
	use LoggerTrait;

	/**
	 * The logger object.
	 *
	 * @var 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 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 = [] ) {
		$this->wrapped_logger->log( $level, $message, $context );
	}
}