lithium\analysis\logger\adapter\File::write()
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
\ClosureFunction returning boolean true
on successful write, false
otherwise.
Source
public function write($priority, $message) {
$config = $this->_config;
return function($self, $params) use (&$config) {
$path = $config['path'] . '/' . $config['file']($params, $config);
$params['timestamp'] = date($config['timestamp']);
$message = String::insert($config['format'], $params);
return file_put_contents($path, $message, FILE_APPEND);
};
}