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.'); }}}
또한 보기: lithium\storage\Cache
상속: extends lithium\core\Object
파일 보기 프로젝트 열기: unionofrad/lithium

보호된 프로퍼티들

프로퍼티 타입 설명
$_classes array Classes used by Cache.

공개 메소드들

메소드 설명
__construct ( array $config = [] ) : void Constructor.
write ( string $priority, string $message ) : Closure Writes the message to the configured cache adapter.

메소드 상세

__construct() 공개 메소드

Constructor.
또한 보기: lithium\util\String
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

write() 공개 메소드

Writes the message to the configured cache adapter.
public write ( string $priority, string $message ) : Closure
$priority string
$message string
리턴 Closure Function returning boolean `true` on successful write, `false` otherwise.

프로퍼티 상세

$_classes 보호되어 있는 프로퍼티

Classes used by Cache.
protected array $_classes
리턴 array