Skip to content

Commit

Permalink
DibiFirePhpLogger: Allow user defined size of json stream chunks [Closes
Browse files Browse the repository at this point in the history
  • Loading branch information
brablc authored and dg committed Jan 13, 2015
1 parent d6826d6 commit 39be00e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dibi/libs/DibiFirePhpLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -78,7 +81,7 @@ public function logEvent(DibiEvent $event)
),
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
}
Expand Down

0 comments on commit 39be00e

Please sign in to comment.