fix bug
This commit is contained in:
parent
4d33779ad0
commit
4964dade7d
|
@ -4,7 +4,6 @@ namespace JsonRpc;
|
||||||
|
|
||||||
use GuzzleHttp\Exception\ServerException;
|
use GuzzleHttp\Exception\ServerException;
|
||||||
use JsonRpc\Exception\RpcServerException;
|
use JsonRpc\Exception\RpcServerException;
|
||||||
use Monolog\Logger;
|
|
||||||
|
|
||||||
class Client
|
class Client
|
||||||
{
|
{
|
||||||
|
@ -16,7 +15,7 @@ class Client
|
||||||
*/
|
*/
|
||||||
protected $http;
|
protected $http;
|
||||||
|
|
||||||
public function __construct($config, Logger $logger)
|
public function __construct($config)
|
||||||
{
|
{
|
||||||
$default = [
|
$default = [
|
||||||
'app' => '***',
|
'app' => '***',
|
||||||
|
|
|
@ -19,10 +19,10 @@ class ClientServiceProvider extends ServiceProvider
|
||||||
$this->app->configure('rpc');
|
$this->app->configure('rpc');
|
||||||
|
|
||||||
$config = config('rpc.client');
|
$config = config('rpc.client');
|
||||||
$logger = new Logger('rpc-client-logger');
|
// $logger = new Logger('rpc-client-logger');
|
||||||
$logger->pushHandler(new StreamHandler($this->app->storagePath()."/logs/rpc_client_".date("Ymd").".log"));
|
// $logger->pushHandler(new StreamHandler($this->app->storagePath()."/logs/rpc_client_".date("Ymd").".log"));
|
||||||
$this->app->singleton('rpc', function () use ($config, $logger) {
|
$this->app->singleton('rpc', function () use ($config) {
|
||||||
return new Client($config, $logger);
|
return new Client($config);
|
||||||
});
|
});
|
||||||
|
|
||||||
foreach ($config as $k => $item) {
|
foreach ($config as $k => $item) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user