lithium\analysis\logger\adapter\Cache::write()
Writes the message to the configured cache adapter.
Parameters
-
string
$priority
-
string
$message
Returns
\ClosureFunction returning boolean true
on successful write, false
otherwise.
Source
public function write($priority, $message) {
return function($params) {
$cache = $this->_classes['cache'];
$params += ['timestamp' => strtotime('now')];
if (!is_callable($key = $this->_config['key'])) {
$key = function($data) use ($key) { return Text::insert($key, $data); };
}
return $cache::write(
$this->_config['config'],
$cache::key($this->_config['config'], $key, $params),
$params['message'],
$this->_config['expiry']
);
};
}