From 39be00e08bfc6b248a32635ff02b1711f63109d4 Mon Sep 17 00:00:00 2001 From: Ondrej Brablc Date: Fri, 17 Oct 2014 11:50:03 +0200 Subject: [PATCH] DibiFirePhpLogger: Allow user defined size of json stream chunks [Closes #148] --- dibi/libs/DibiFirePhpLogger.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dibi/libs/DibiFirePhpLogger.php b/dibi/libs/DibiFirePhpLogger.php index 1f2bf311..64cf94c3 100644 --- a/dibi/libs/DibiFirePhpLogger.php +++ b/dibi/libs/DibiFirePhpLogger.php @@ -20,6 +20,9 @@ class DibiFirePhpLogger extends DibiObject /** maximum SQL length */ static public $maxLength = 1000; + /** size of json stream chunk */ + static public $streamChunkSize = 4990; + /** @var int */ public $filter; @@ -78,7 +81,7 @@ class DibiFirePhpLogger extends DibiObject ), self::$fireTable, )); - foreach (str_split($payload, 4990) as $num => $s) { + foreach (str_split($payload, self::$streamChunkSize) as $num => $s) { $num++; header("X-Wf-dibi-1-1-d$num: |$s|\\"); // protocol-, structure-, plugin-, message-index }