|
Plop
A simple logging library for PHP
|
A class that stores a log record. More...
Inheritance diagram for Plop\Record:Public Member Functions | |
| __construct ($loggerNamespace, $loggerClass, $loggerMethod, $namespace, $class, $method, $level, $pathname, $lineno, $msg, array $args,\Plop\InterpolatorInterface $interpolator,\Exception $exception=null) | |
| asArray () | |
| getInterpolator () | |
| getMessage () | |
| offsetExists ($offset) | |
| offsetGet ($offset) | |
| offsetSet ($offset, $value) | |
| offsetUnset ($offset) | |
| serialize () | |
| setInterpolator (\Plop\InterpolatorInterface $interpolator) | |
| unserialize ($data) | |
Protected Attributes | |
| $dict | |
| Array of properties for the log record. | |
A class that stores a log record.
A log records contains everything that is related to a specific log, like what time it was emitted at, the level of the log, the file that emitted it, etc.
Definition at line 31 of file Record.php.
| Plop\Record::__construct | ( | $loggerNamespace, | |
| $loggerClass, | |||
| $loggerMethod, | |||
| $namespace, | |||
| $class, | |||
| $method, | |||
| $level, | |||
| $pathname, | |||
| $lineno, | |||
| $msg, | |||
| array | $args, | ||
| \Plop\InterpolatorInterface | $interpolator, | ||
| \Exception | $exception = null |
||
| ) |
Construct a new log record.
| string | $loggerNamespace | Namespace associated with the logger that captured the log. |
| string | $loggerClass | Class associated with the logger that captured the log. |
| string | $loggerMethod | Method or function associated with the logger that captured the log. |
| string | $namespace | Namespace where the log was emitted. |
| string | $class | Class where the log was emitted. |
| string | $method | Method or function where the log was emitted. |
| int | $level | The level of the log. |
| string | $pathname | The name of the file where the log was emitted. |
| int | $lineno | The line number where the log was emitted inside the file indicated by the $pathname parameter. |
| string | $msg | The message to log. |
| array | $args | Additional arguments for the log message. |
| Plop::InterpolatorInterface | $interpolator | Interpolator to use during record formatting. |
| null | Exception | $exception | An exception whose backtrace will be merged into the log message. |
Definition at line 80 of file Record.php.
References Plop\Plop\getInstance().
| Plop\Record::asArray | ( | ) |
The properties of this log record, as an associative array.
| array | An associative array with the properties of this log record. |
Implements Plop\RecordInterface.
Definition at line 265 of file Record.php.
| Plop\Record::getInterpolator | ( | ) |
Return this record's message interpolator.
| Plop::InterpolatorInterface | Message interpolator. |
Implements Plop\RecordInterface.
Definition at line 152 of file Record.php.
| Plop\Record::getMessage | ( | ) |
Return the message stored in this log record, after all interpolated variables have been replaced in it.
| string | The message stored in the log record. |
Implements Plop\RecordInterface.
Definition at line 165 of file Record.php.
| Plop\Record::offsetExists | ( | $offset | ) |
Test whether a given property exists for this log record.
| string | $offset | The name of the property whose existence must be checked. |
| bool | true if the given property exists for this log record, false otherwise. |
Implements ArrayAccess.
Definition at line 248 of file Record.php.
| Plop\Record::offsetGet | ( | $offset | ) |
Return the value for one of the properties of the log record.
| string | $offset | The name of the property to return. The default properties include:
|
Additional properties may be available.
| mixed | The value for that property. |
Implements ArrayAccess.
Definition at line 212 of file Record.php.
| Plop\Record::offsetSet | ( | $offset, | |
| $value | |||
| ) |
Add/set a new value for a property of this log.
| string | $offset | The name of the property to add/set. |
| mixed | $value | The new value for that property. |
Implements ArrayAccess.
Definition at line 231 of file Record.php.
| Plop\Record::offsetUnset | ( | $offset | ) |
Remove a property from this log record.
| string | $offset | The name of the property to remove. |
Implements ArrayAccess.
Definition at line 259 of file Record.php.
| Plop\Record::serialize | ( | ) |
Serialize this log record.
| string | Serialized representation of this record. |
Definition at line 276 of file Record.php.
| Plop\Record::setInterpolator | ( | \Plop\InterpolatorInterface | $interpolator | ) |
Implements Plop\RecordInterface.
Definition at line 158 of file Record.php.
| Plop\Record::unserialize | ( | $data | ) |
Reconstruct a log record from its serialized representation.
| string | $data | Serialized representation of the record. |
Definition at line 291 of file Record.php.