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