73 return $this->
toJson($this->
normalize($record),
true) . ($this->appendNewline ?
"\n" :
'');
81 switch ($this->batchMode) {
82 case static::BATCH_MODE_NEWLINES:
85 case static::BATCH_MODE_JSON:
122 $this->appendNewline =
false;
123 array_walk($records,
function (&$value,
$key) use ($instance) {
124 $value = $instance->format($value);
126 $this->appendNewline = $oldNewline;
128 return implode(
"\n", $records);
140 if (is_array(
$data) ||
$data instanceof \Traversable) {
141 $normalized =
array();
145 if ($count++ >= 1000) {
146 $normalized[
'...'] =
'Over 1000 items, aborting normalization';
174 throw new \InvalidArgumentException(
'Exception/Throwable expected, got '.gettype($e).
' / '.get_class($e));
178 'class' => get_class($e),
179 'message' => $e->getMessage(),
180 'code' => $e->getCode(),
181 'file' => $e->getFile().
':'.$e->getLine(),
185 $trace = $e->getTrace();
186 foreach ($trace as $frame) {
187 if (isset($frame[
'file'])) {
188 $data[
'trace'][] = $frame[
'file'].
':'.$frame[
'line'];
189 } elseif (isset($frame[
'function']) && $frame[
'function'] ===
'{closure}') {
191 $data[
'trace'][] = $frame[
'function'];
199 if ($previous = $e->getPrevious()) {
Create styles array
The data for the language used.