1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 01:26:11 +02:00

Tweak const visibility, refs #1228

This commit is contained in:
Jordi Boggiano
2018-11-29 20:05:19 +01:00
parent a7984a640f
commit bb99e4c699
16 changed files with 48 additions and 55 deletions

View File

@@ -22,9 +22,9 @@ use Monolog\Logger;
class SqsHandler extends AbstractProcessingHandler
{
/** 256 KB in bytes - maximum message size in SQS */
public const MAX_MESSAGE_SIZE = 262144;
protected const MAX_MESSAGE_SIZE = 262144;
/** 100 KB in bytes - head message size for new error log */
public const HEAD_MESSAGE_SIZE = 102400;
protected const HEAD_MESSAGE_SIZE = 102400;
/** @var SqsClient */
private $client;
@@ -51,8 +51,8 @@ class SqsHandler extends AbstractProcessingHandler
}
$messageBody = $record['formatted'];
if (strlen($messageBody) >= self::MAX_MESSAGE_SIZE) {
$messageBody = substr($messageBody, 0, self::HEAD_MESSAGE_SIZE);
if (strlen($messageBody) >= static::MAX_MESSAGE_SIZE) {
$messageBody = substr($messageBody, 0, static::HEAD_MESSAGE_SIZE);
}
$this->client->sendMessage([