PHP Класс lithium\analysis\logger\adapter\Cache
{{{ lithium\storage\Cache::config(array(
'storage' => array('adapter' => 'Redis', 'server' => '127.0.0.1:6379')
));}}}
Then, you can configure the
Cache logger with the
'storage' config:
{{{ lithium\analysis\Logger::config(array(
'debug' => array('adapter' => 'Cache', 'config' => 'storage')
));
}}}
You can then send messages to the logger which will be written to the cache store:
{{{
lithium\analysis\Logger::write('debug', 'This message will be written to a Redis data store.');
}}}
Показать файл
Открыть проект
Защищенные свойства (Protected)
Открытые методы
Описание методов
__construct()
публичный Метод
public __construct ( array $config = [] ) : void |
$config |
array |
Possible configuration options are:
- `'config'`: The name of the cache configuration to use; defaults to none.
- `'expiry'`: Defines when the logged item should expire, by default will
try to expire as late as possible.
- `'key'`: Either a pattern where priority and timestamp will be inserted
or a closure wich must return a key to store the message under and
which gets passed a params array as first and only argument; defaults
to `'log_{:priority}_{:timestamp}'`. |
Результат |
void |
|
Writes the message to the configured cache adapter.
Описание свойств
$_classes защищенное свойство
protected array $_classes |
Результат |
array |
|