mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-04 12:17:35 +02:00
Merge pull request #1412 from fbnfgc/patch-1
Set phpredis multi() mode parameter
This commit is contained in:
@@ -73,7 +73,8 @@ class RedisHandler extends AbstractProcessingHandler
|
|||||||
protected function writeCapped(array $record)
|
protected function writeCapped(array $record)
|
||||||
{
|
{
|
||||||
if ($this->redisClient instanceof \Redis) {
|
if ($this->redisClient instanceof \Redis) {
|
||||||
$this->redisClient->multi()
|
$mode = defined('\Redis::MULTI') ? \Redis::MULTI : 1;
|
||||||
|
$this->redisClient->multi($mode)
|
||||||
->rpush($this->redisKey, $record["formatted"])
|
->rpush($this->redisKey, $record["formatted"])
|
||||||
->ltrim($this->redisKey, -$this->capSize, -1)
|
->ltrim($this->redisKey, -$this->capSize, -1)
|
||||||
->exec();
|
->exec();
|
||||||
|
Reference in New Issue
Block a user