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:
committed by
David Grudl
parent
d6826d62ed
commit
39be00e08b
@@ -20,6 +20,9 @@ class DibiFirePhpLogger extends DibiObject
|
|||||||
/** maximum SQL length */
|
/** maximum SQL length */
|
||||||
static public $maxLength = 1000;
|
static public $maxLength = 1000;
|
||||||
|
|
||||||
|
/** size of json stream chunk */
|
||||||
|
static public $streamChunkSize = 4990;
|
||||||
|
|
||||||
/** @var int */
|
/** @var int */
|
||||||
public $filter;
|
public $filter;
|
||||||
|
|
||||||
@@ -78,7 +81,7 @@ class DibiFirePhpLogger extends DibiObject
|
|||||||
),
|
),
|
||||||
self::$fireTable,
|
self::$fireTable,
|
||||||
));
|
));
|
||||||
foreach (str_split($payload, 4990) as $num => $s) {
|
foreach (str_split($payload, self::$streamChunkSize) as $num => $s) {
|
||||||
$num++;
|
$num++;
|
||||||
header("X-Wf-dibi-1-1-d$num: |$s|\\"); // protocol-, structure-, plugin-, message-index
|
header("X-Wf-dibi-1-1-d$num: |$s|\\"); // protocol-, structure-, plugin-, message-index
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user