Revert "Convert Config to a singleton (#16349)" (#16382)

This reverts commit f1e7a218f0.
This commit is contained in:
Jellyfrog
2024-09-10 09:59:20 +02:00
committed by GitHub
parent f1e7a218f0
commit 77fa7573cf
16 changed files with 470 additions and 713 deletions

View File

@@ -211,7 +211,6 @@ return [
'PluginManager' => \App\Facades\PluginManager::class,
'Rrd' => \App\Facades\Rrd::class,
'SnmpQuery' => \App\Facades\FacadeAccessorSnmp::class,
'LibrenmsConfig' => \App\Facades\LibrenmsConfig::class,
])->forget([
'Http', // don't use Laravel Http facade, LibreNMS has its own wrapper
])->toArray(),

View File

@@ -53,13 +53,4 @@
'node_id' => env('NODE_ID'),
/*
|--------------------------------------------------------------------------
| Config Cache TTL
|--------------------------------------------------------------------------
|
| Amount of seconds to allow the config to be cached. 0 means no cache.
*/
'config_cache_ttl' => env('CONFIG_CACHE_TTL', 0),
];

View File

@@ -80,7 +80,7 @@ return [
'single' => [
'driver' => 'single',
'path' => env('APP_LOG', base_path('logs/librenms.log')),
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
'formatter' => \App\Logging\NoColorFormatter::class,
'level' => env('LOG_LEVEL', 'error'),
'replace_placeholders' => true,
@@ -88,7 +88,7 @@ return [
'daily' => [
'driver' => 'daily',
'path' => env('APP_LOG', base_path('logs/librenms.log')),
'path' => env('APP_LOG', \LibreNMS\Config::get('log_file', base_path('logs/librenms.log'))),
'formatter' => \App\Logging\NoColorFormatter::class,
'level' => env('LOG_LEVEL', 'error'),
'days' => 14,