app instanceof LaravelApplication && $this->app->runningInConsole()) { $this->publishes([$source => config_path('rpc.php')], 'rpc'); } elseif ($this->app instanceof LumenApplication) { $this->app->configure('rpc'); } $this->mergeConfigFrom($source, 'rpc'); } public function register() { $this->setupConfig(); $this->app->singleton("rpc.logger", function () { $config = config('rpc'); $stream = new StreamHandler($config['log_path']); $stream->setFormatter(new $config['log_formatter']()); $logger = new Logger('RPC.LOGGER'); return $logger->pushHandler($stream); }); } }