diff --git a/src/Client.php b/src/Client.php index b51aa65..be1dad9 100644 --- a/src/Client.php +++ b/src/Client.php @@ -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(); } } \ No newline at end of file diff --git a/src/Providers/ClientServiceProvider.php b/src/Providers/ClientServiceProvider.php index ef4a624..0c58e3b 100644 --- a/src/Providers/ClientServiceProvider.php +++ b/src/Providers/ClientServiceProvider.php @@ -31,8 +31,4 @@ class ClientServiceProvider extends ServiceProvider } } -// public function provides() -// { -// return ['rpc']; -// } } \ No newline at end of file