ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Logs to a Redis key using rpush. More...
Public Member Functions | ||||
__construct ($redis, $key, $level=Logger::DEBUG, $bubble=true, $capSize=false) | ||||
Public Member Functions inherited from Monolog\Handler\AbstractProcessingHandler | ||||
handle (array $record) | ||||
{Handles a record.All records may be passed to this method, and the handler should discard those that it does not want to handle.The return value of this function controls the bubbling process of the handler stack. Unless the bubbling is interrupted (by returning true), the Logger class will keep on calling further handlers in the stack with a given log record.
| ||||
Public Member Functions inherited from Monolog\Handler\AbstractHandler | ||||
__construct ($level=Logger::DEBUG, $bubble=true) | ||||
isHandling (array $record) | ||||
{Checks whether the given record will be handled by this handler.This is mostly done for performance reasons, to avoid calling processors for nothing.Handlers should still check the record levels within handle(), returning false in isHandling() is no guarantee that handle() will not be called, and isHandling() might not be called for a given record.
| ||||
handleBatch (array $records) | ||||
{Handles a set of records at once.
| ||||
close () | ||||
Closes the handler. More... | ||||
pushProcessor ($callback) | ||||
{Adds a processor in the stack.
| ||||
popProcessor () | ||||
{Removes the processor on top of the stack and returns it.
| ||||
setFormatter (FormatterInterface $formatter) | ||||
{Sets the formatter.
| ||||
getFormatter () | ||||
{Gets the formatter.
| ||||
setLevel ($level) | ||||
Sets minimum logging level at which this handler will be triggered. More... | ||||
getLevel () | ||||
Gets minimum logging level at which this handler will be triggered. More... | ||||
setBubble ($bubble) | ||||
Sets the bubbling behavior. More... | ||||
getBubble () | ||||
Gets the bubbling behavior. More... | ||||
__destruct () | ||||
reset () | ||||
Protected Member Functions | |
write (array $record) | |
writeCapped (array $record) | |
Write and cap the collection Writes the record to the redis list and caps its. More... | |
getDefaultFormatter () | |
Protected Member Functions inherited from Monolog\Handler\AbstractProcessingHandler | |
write (array $record) | |
Writes the record down to the log of the implementing handler. More... | |
processRecord (array $record) | |
Processes a record. More... | |
Protected Member Functions inherited from Monolog\Handler\AbstractHandler | |
getDefaultFormatter () | |
Gets the default formatter. More... | |
Protected Attributes | |
$capSize | |
Protected Attributes inherited from Monolog\Handler\AbstractHandler | |
$level = Logger::DEBUG | |
$bubble = true | |
$formatter | |
$processors = array() | |
Private Attributes | |
$redisClient | |
$redisKey | |
Logs to a Redis key using rpush.
usage example:
$log = new Logger('application'); $redis = new RedisHandler(new Predis("tcp://localhost:6379"), "logs", "prod"); $log->pushHandler($redis);
Definition at line 28 of file RedisHandler.php.
Monolog\Handler\RedisHandler::__construct | ( | $redis, | |
$key, | |||
$level = Logger::DEBUG , |
|||
$bubble = true , |
|||
$capSize = false |
|||
) |
\Predis\Client | \Redis | $redis | The redis instance |
string | $key | The key name to push records to |
int | $level | The minimum logging level at which this handler will be triggered |
bool | $bubble | Whether the messages that are handled can bubble up the stack or not |
int | $capSize | Number of entries to limit list size to |
Definition at line 41 of file RedisHandler.php.
References Monolog\Handler\AbstractHandler\$bubble, Monolog\Handler\RedisHandler\$capSize, $key, and Monolog\Handler\AbstractHandler\$level.
|
protected |
Definition at line 93 of file RedisHandler.php.
|
protected |
Definition at line 57 of file RedisHandler.php.
References Monolog\Handler\RedisHandler\writeCapped().
|
protected |
Write and cap the collection Writes the record to the redis list and caps its.
array | $record | associative record array |
Definition at line 73 of file RedisHandler.php.
References Monolog\Handler\RedisHandler\$capSize, and Monolog\Handler\RedisHandler\$redisKey.
Referenced by Monolog\Handler\RedisHandler\write().
|
protected |
Definition at line 32 of file RedisHandler.php.
Referenced by Monolog\Handler\RedisHandler\__construct(), and Monolog\Handler\RedisHandler\writeCapped().
|
private |
Definition at line 30 of file RedisHandler.php.
|
private |
Definition at line 31 of file RedisHandler.php.
Referenced by Monolog\Handler\RedisHandler\writeCapped().