104 ->setCreated(microtime(TRUE))
203 $this->data = array_merge($this->data, $data);
254 $timestamp = date(
'r', (
int)$this->created);
257 if (!empty($this->data)) {
260 if (isset($this->data[
'exception']) && $this->data[
'exception'] instanceof \
Exception) {
261 $this->data[
'exception'] = (string)$this->data[
'exception'];
263 $data =
'- ' . json_encode($this->data);
265 $logRecordString = sprintf(
266 '%s [%s] request="%s" component="%s": %s %s',
274 return $logRecordString;
284 'requestId' => $this->requestId,
285 'created' => $this->created,
286 'component' => $this->component,
287 'level' => $this->level,
288 'message' => $this->message,
289 'data' => $this->data
300 $offsetExists = FALSE;
301 if (in_array($offset, $this->gettableProperties, TRUE) && isset($this->{$offset})) {
302 $offsetExists = TRUE;
304 return $offsetExists;
314 if (!in_array($offset, $this->gettableProperties, TRUE)) {
317 return $this->{$offset};
328 if (in_array($offset, $this->settableProperties, TRUE)) {
329 $this->{$offset} = $offset;
340 if (in_array($offset, $this->settableProperties, TRUE)) {
341 unset($this->{$offset});
static validateLevel($level)
offsetSet($offset, $value)
__construct($component='', $level, $message, array $data=array())