Logger::log( mixed $level, string $message, array $context = array() )

Logs a message with an arbitrary level.

Description

See also

Parameters

$level

(mixed) (Required) Message level.

$message

(string) (Required) Message to log.

$context

(array) (Optional) Additional context data.

Default value: array()

Source

File: src/logger.php

	public function log( $level, $message, array $context = array() ) {
		$message_type = $this->to_php_error_constant( $level );

		if ( E_USER_NOTICE === $message_type && ! empty( $context['deprecated'] ) ) {
			$message_type = E_USER_DEPRECATED;
		}

		trigger_error( $message, $message_type );
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.