1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-22 17:16:18 +02:00

Merge branch '1.x'

This commit is contained in:
Jordi Boggiano
2019-12-20 14:53:43 +01:00
4 changed files with 28 additions and 14 deletions

View File

@@ -157,6 +157,10 @@ class JsonFormatter extends NormalizerFormatter
return $this->normalizeException($data, $depth);
}
if (is_resource($data)) {
return parent::normalize($data);
}
return $data;
}

View File

@@ -71,7 +71,8 @@ class RedisHandler extends AbstractProcessingHandler
protected function writeCapped(array $record): void
{
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();