1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 05:37:39 +02:00

DibiFirePhpLogger: Allow user defined size of json stream chunks [Closes #148]

This commit is contained in:
Ondrej Brablc
2014-10-17 11:50:03 +02:00
committed by David Grudl
parent d6826d62ed
commit 39be00e08b

View File

@@ -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
}