/** @var string Hash of client parameters */
protected $clientId;
/** @var string[] Map of client information fields for logging */
- protected $clientInfo;
+ protected $clientLogInfo;
/** @var int|null Expected minimum index of the last write to the position store */
protected $waitForPosIndex;
/** @var int Max seconds to wait on positions to appear */
$this->key = $store->makeGlobalKey( __CLASS__, $this->clientId, 'v2' );
$this->waitForPosIndex = $posIndex;
- $this->clientInfo = $client + [ 'clientId' => '' ];
+ $this->clientLogInfo = [
+ 'clientIP' => $client['ip'],
+ 'clientAgent' => $client['agent'],
+ 'clientId' => $client['clientId'] ?? null
+ ];
$this->logger = new NullLogger();
}
[
'cpPosIndex' => $this->waitForPosIndex,
'waitTimeMs' => $waitedMs
- ] + $this->clientInfo
+ ] + $this->clientLogInfo
);
} else {
$this->logger->warning(
'cpPosIndex' => $this->waitForPosIndex,
'indexReached' => $indexReached,
'waitTimeMs' => $waitedMs
- ] + $this->clientInfo
+ ] + $this->clientLogInfo
);
}
} else {