/** * {@inheritdoc} * @see AbstractLogger::getCommonData() */ protected function getCommonData() { $data = parent::getCommonData(); $data['ip_address'] = $this->ipAddress; $data['request_type'] = $this->requestType; $data['request_id'] = $this->requestId; return $data; }
/** * {@inheritdoc} * @see AbstractLogger::initializeSubscribers() */ protected function initializeSubscribers() { parent::initializeSubscribers(); $this->subscribers['user.log'] = [$this, 'handlerUserLog']; }
/** * {@inheritdoc} * @see AbstractLogger::getCommonData() */ protected function getCommonData() { $data = parent::getCommonData(); if (empty($this->user)) { $data['login'] = $this->systemTask ? '_' . $this->systemTask : 'guest'; $data['ruid'] = null; $data['euid'] = null; $data['account_id'] = $this->accountId; } else { $data['login'] = $this->user->getEmail(); $data['ruid'] = $this->ruid ?: $this->user->id; $data['euid'] = $this->user->id; $data['account_id'] = $this->user->getAccountId(); } $data['env_id'] = $this->envId; $data['ip_address'] = $this->remoteAddr; $data['request_type'] = $this->requestType; return $data; }