1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 12:47:39 +02:00

Set phpredis multi() mode parameter

This commit is contained in:
Fabien
2019-12-12 15:11:15 +01:00
committed by Fabien Foulgoc
parent b928039c23
commit 39c7e04ad4

View File

@@ -73,7 +73,8 @@ class RedisHandler extends AbstractProcessingHandler
protected function writeCapped(array $record)
{
if ($this->redisClient instanceof \Redis) {
$this->redisClient->multi()
$mode = defined('\Redis::MULTI') ? \Redis::MULTI : 1;
$this->redisClient->multi($mode)
->rpush($this->redisKey, $record["formatted"])
->ltrim($this->redisKey, -$this->capSize, -1)
->exec();