request -id
This commit is contained in:
parent
d1b992a044
commit
1bcb8a010a
|
@ -31,8 +31,7 @@ class Client
|
|||
$stream->setFormatter(new $this->config['log_formatter']());
|
||||
$logger = new Logger('RPC.LOGGER');
|
||||
$logger->pushHandler($stream);
|
||||
$logger->info('call client rpc');
|
||||
$this->id = 0;
|
||||
$this->id = app('request')->header('X-Request-Id')?:"no-x-request-id";
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
|
@ -114,8 +113,7 @@ class Client
|
|||
*/
|
||||
protected function id()
|
||||
{
|
||||
$this->id++;
|
||||
return $this->id;
|
||||
return $this->id.'-'.time();
|
||||
}
|
||||
|
||||
}
|
|
@ -31,8 +31,4 @@ class ClientServiceProvider extends ServiceProvider
|
|||
}
|
||||
}
|
||||
|
||||
// public function provides()
|
||||
// {
|
||||
// return ['rpc'];
|
||||
// }
|
||||
}
|
Loading…
Reference in New Issue
Block a user