Author: Constantine Karnacvevych (c.karnacevych@scalr.com)
Exemple #1
0
 /**
  * {@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;
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  * @see AbstractLogger::initializeSubscribers()
  */
 protected function initializeSubscribers()
 {
     parent::initializeSubscribers();
     $this->subscribers['user.log'] = [$this, 'handlerUserLog'];
 }
Exemple #3
0
 /**
  * {@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;
 }