100 $this->interpolator = $interpolator;
102 $ct = explode(
' ', microtime(
false));
103 $msecs = (int) substr($ct[0] .
'000000', 2);
104 $date = new \DateTime(
'@' . $ct[1],
new \DateTimeZone(
'UTC'));
105 $date = new \DateTime(
108 $date->format(
'Y-m-d\\TH:i:s'),
111 new \DateTimeZone(
'UTC')
113 $created = ((float) $date->format(
'U.u'));
114 $diff = ($created - $logging->getCreationDate()) * 1000;
115 if (isset($_SERVER[
'argv'][0])) {
116 $processName = basename($_SERVER[
'argv'][0]);
121 $date->setTimeZone(
new \DateTimeZone(@date_default_timezone_get()));
123 $this->dict[
'args'] = $args;
124 $this->dict[
'class'] = $class;
125 $this->dict[
'created'] = $created;
126 $this->dict[
'createdDate'] = $date;
127 $this->dict[
'exc_info'] = $exception;
128 $this->dict[
'exc_text'] = null;
129 $this->dict[
'filename'] = $pathname;
130 $this->dict[
'funcName'] = $method;
131 $this->dict[
'hostname'] = php_uname(
'n');
132 $this->dict[
'levelname'] = $logging->getLevelName($level);
133 $this->dict[
'levelno'] = $level;
134 $this->dict[
'lineno'] = $lineno;
135 $this->dict[
'loggerClass'] = $loggerClass;
136 $this->dict[
'loggerMethod'] = $loggerMethod;
137 $this->dict[
'loggerNamespace'] = $loggerNamespace;
138 $this->dict[
'method'] = $method;
139 $this->dict[
'module'] = $namespace;
140 $this->dict[
'msecs'] = $msecs;
141 $this->dict[
'msg'] = $msg;
142 $this->dict[
'namespace'] = $namespace;
143 $this->dict[
'pathname'] = $pathname;
144 $this->dict[
'process'] = $pid;
145 $this->dict[
'processName'] = $processName;
146 $this->dict[
'relativeCreated'] = $diff;
147 $this->dict[
'threadId'] = null;
148 $this->dict[
'threadCreatorId'] = null;
154 return $this->interpolator;
160 $this->interpolator = $interpolator;
167 return $this->interpolator->interpolate(
214 return $this->dict[$offset];
233 return $this->dict[$offset] = $value;
250 return isset($this->dict[$offset]);
261 unset($this->dict[$offset]);
278 return serialize(array($this->dict, $this->interpolator));
293 $data = unserialize($data);
294 $this->dict = $data[0];
295 $this->setInterpolator($data[1]);
$dict
Array of properties for the log record.
Interface for a log record.
offsetSet($offset, $value)
setInterpolator(\Plop\InterpolatorInterface $interpolator)
__construct($loggerNamespace, $loggerClass, $loggerMethod, $namespace, $class, $method, $level, $pathname, $lineno, $msg, array $args,\Plop\InterpolatorInterface $interpolator,\Exception $exception=null)
This exception is thrown by Plop whenever a problem is detected.
A class that stores a log record.