lithium\analysis\logger\adapter\File::write()

public method

Appends a message to a log file.

Parameters

  • string $priority

    The message priority. See Logger::$_priorities.

  • string $message

    The message to write to the log.

Returns

\Closure

Function returning boolean true on successful write, false otherwise.

Source

	public function write($priority, $message) {
		return function($params) {
			$path = $this->_config['path'] . '/' . $this->_config['file']($params, $this->_config);
			$params['timestamp'] = date($this->_config['timestamp']);
			$message = Text::insert($this->_config['format'], $params);
			return file_put_contents($path, $message, FILE_APPEND);
		};
	}