function JsonLogData::__construct in JSONlog 8
Same name and namespace in other branches
- 8.2 src/Logger/JsonLogData.php \Drupal\jsonlog\Logger\JsonLogData::__construct()
- 3.x src/Logger/JsonLogData.php \Drupal\jsonlog\Logger\JsonLogData::__construct()
JsonLogData constructor.
Parameters
string $site_id:
string $canonical:
File
- src/
Logger/ JsonLogData.php, line 52
Class
Namespace
Drupal\jsonlog\LoggerCode
function __construct($site_id, $canonical) {
$this->trunc = '';
$this->message_id = uniqid($site_id, TRUE);
$this->site_id = $site_id;
$this->canonical = $canonical;
$this->type = 'drupal';
$this->{'@version'} = 1;
$this
->setTimestamp();
}