Author: Constantine Karnacvevych (c.karnacevych@scalr.com)
コード例 #1
0
ファイル: ApiLogger.php プロジェクト: scalr/scalr
 /**
  * {@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;
 }
コード例 #2
0
ファイル: UserLogger.php プロジェクト: scalr/scalr
 /**
  * {@inheritdoc}
  * @see AbstractLogger::initializeSubscribers()
  */
 protected function initializeSubscribers()
 {
     parent::initializeSubscribers();
     $this->subscribers['user.log'] = [$this, 'handlerUserLog'];
 }
コード例 #3
0
ファイル: AuditLogger.php プロジェクト: scalr/scalr
 /**
  * {@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;
 }