diff --git a/src/InfluxDBServiceProvider.php b/src/InfluxDBServiceProvider.php index 8d483f9..04286f5 100644 --- a/src/InfluxDBServiceProvider.php +++ b/src/InfluxDBServiceProvider.php @@ -16,7 +16,7 @@ public function boot() $this->publishes([ $this->configPath() => config_path('influxdb.php') ]); - + $this->mergeConfigFrom($this->configPath(), 'influxdb'); if (config('influxdb.use_monolog_handler') === 'true') { @@ -48,7 +48,7 @@ public function register() config('influxdb.host'), config('influxdb.port'), '' //config('influxdb.database') - ) + ), config('influxdb.timeout') ); } catch (ClientException $e) { // die silently diff --git a/src/config/InfluxDB.php b/src/config/InfluxDB.php index bf3f795..903cbac 100644 --- a/src/config/InfluxDB.php +++ b/src/config/InfluxDB.php @@ -37,4 +37,9 @@ * Use 0 for no limit */ 'log_message_lines_limit' => env('LARAVEL_INFLUX_PROVIDER_LOG_MESSAGE_LINES_LIMIT', 5), + + /** + * Timeout + */ + 'timeout' => env('LARAVEL_INFLUX_PROVIDER_TIMEOUT', 0), ];