public static function write($priority, $message, array $options = []) {
		$defaults = ['name' => null];
		$options += $defaults;
		$result = true;

		if (isset(static::$_configurations[$options['name']])) {
			$name = $options['name'];
			$methods = [$name => static::adapter($name)->write($priority, $message, $options)];
		} elseif (!isset(static::$_priorities[$priority])) {
			$message = "Attempted to write log message with invalid priority `{$priority}`.";
			throw new UnexpectedValueException($message);
		} else {
			$methods = static::_configsByPriority($priority, $message, $options);
		}

		foreach ($methods as $name => $method) {
			$params = compact('priority', 'message', 'options');
			$config = static::_config($name);

			if (!empty($config['filters'])) {
				$message  = 'Per adapter filters have been deprecated. Please ';
				$message .= "filter the manager class' static methods instead.";
				trigger_error($message, E_USER_DEPRECATED);

				$r = Filters::bcRun(
					get_called_class(), __FUNCTION__, $params, $method, $config['filters']
				);
			} else {
				$r = Filters::run(get_called_class(), __FUNCTION__, $params, $method);
			}
			if (!$r) {
				$result = false;
			}
		}
		return $methods ? $result : false;
	}
public static function write($priority, $message, array $options = []) {
		$defaults = ['name' => null];
		$options += $defaults;
		$result = true;

		if (isset(static::$_configurations[$options['name']])) {
			$name = $options['name'];
			$methods = [$name => static::adapter($name)->write($priority, $message, $options)];
		} elseif (!isset(static::$_priorities[$priority])) {
			$message = "Attempted to write log message with invalid priority `{$priority}`.";
			throw new UnexpectedValueException($message);
		} else {
			$methods = static::_configsByPriority($priority, $message, $options);
		}

		foreach ($methods as $name => $method) {
			$params = compact('priority', 'message', 'options');
			$config = static::_config($name);

			if (!empty($config['filters'])) {
				$message  = 'Per adapter filters have been deprecated. Please ';
				$message .= "filter the manager class' static methods instead.";
				trigger_error($message, E_USER_DEPRECATED);

				$r = Filters::bcRun(
					get_called_class(), __FUNCTION__, $params, $method, $config['filters']
				);
			} else {
				$r = Filters::run(get_called_class(), __FUNCTION__, $params, $method);
			}
			if (!$r) {
				$result = false;
			}
		}
		return $methods ? $result : false;
	}
public static function write ( $ priority , $ message , array $ options = [ ] ) { $ defaults = [ 'name' => null ] ; $ options += $ defaults ; $ result = true ; if ( isset ( static :: $ _configurations [ $ options [ 'name' ] ] ) ) { $ name = $ options [ 'name' ] ; $ methods = [ $ name => static :: adapter ( $ name ) -> write ( $ priority , $ message , $ options ) ] ; } elseif ( ! isset ( static :: $ _priorities [ $ priority ] ) ) { $ message = "Attempted to write log message with invalid priority `{$priority}`." ; throw new UnexpectedValueException ( $ message ) ; } else { $ methods = static :: _configsByPriority ( $ priority , $ message , $ options ) ; } foreach ( $ methods as $ name => $ method ) { $ params = compact ( 'priority' , 'message' , 'options' ) ; $ config = static :: _config ( $ name ) ; if ( ! empty ( $ config [ 'filters' ] ) ) { $ message = 'Per adapter filters have been deprecated. Please ' ; $ message .= "filter the manager class' static methods instead." ; trigger_error ( $ message , E_USER_DEPRECATED ) ; $ r = Filters :: bcRun ( get_called_class ( ) , __FUNCTION__ , $ params , $ method , $ config [ 'filters' ] ) ; } else { $ r = Filters :: run ( get_called_class ( ) , __FUNCTION__ , $ params , $ method ) ; } if ( ! $ r ) { $ result = false ; } } return $ methods ? $ result : false ; }
Writes a message to one or more log adapters, where the adapters that are written to are the
ones that respond to the given priority level.

@param string $priority The priority of the log message to be written.
@param string $message The message to be written.
@param array $options An array of adapter-specific options that may be passed when writing
log messages. Some options are also handled by `Logger` itself:
- `'name'` _string_: This option can be specified if you wish to write to a
specific adapter configuration, instead of writing to the adapter(s) that
respond to the given priority.
@return boolean Returns `true` if all log writes succeeded, or `false` if _any or all_ writes
failed.
@throws UnexpectedValueException If the value of `$priority` is not a defined priority value,
an `UnexpectedValueException` will be thrown.
@filter
Writes a message to one or more log adapters where the adapters that are written to are the ones that respond to the given priority level .