lithium\analysis\logger\adapter\FirePhp::_format()

protected method

Generates a string representation of the type and message, suitable for FirePHP.

Parameters

  • string $type

    Represents the message priority.

  • string $message

    Contains the actual message to store.

Returns

array

Returns the encoded string representations of the priority and message, in the 'key' and 'content' keys, respectively.

Source

	protected function _format($type, $message) {
		$key = 'X-Wf-1-1-1-' . $this->_counter++;

		$content = array(array('Type' => $this->_levels[$type]), $message);
		$content = json_encode($content);
		$content = strlen($content) . '|' . $content . '|';

		return compact('key', 'content');
	}