lithium\analysis\logger\adapter\File::write()
Appends a message to a log file.
Parameters
-
string
$priorityThe message priority. See
Logger::$_priorities. -
string
$messageThe message to write to the log.
Returns
\ClosureFunction 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);
};
}