mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Remove debug globals (#12811)
* Remove $debug global and $vdebug global makes these variables more accessible and protects from collisions. * the on boot set sends application as the first parameter, just handle that * Relocate other debug related functions * Log debug to stdout * Wrong output * remove stupid constants * Fix lint and style issues
This commit is contained in:
9
ping.php
9
ping.php
@@ -3,6 +3,7 @@
|
||||
|
||||
use App\Jobs\PingCheck;
|
||||
use LibreNMS\Data\Store\Datastore;
|
||||
use LibreNMS\Util\Debug;
|
||||
|
||||
$init_modules = ['alerts', 'laravel', 'nodb'];
|
||||
require __DIR__ . '/includes/init.php';
|
||||
@@ -21,12 +22,8 @@ END;
|
||||
exit;
|
||||
}
|
||||
|
||||
set_debug(isset($options['d']));
|
||||
|
||||
if (isset($options['v'])) {
|
||||
global $vdebug;
|
||||
$vdebug = true;
|
||||
}
|
||||
Debug::set(isset($options['d']));
|
||||
Debug::setVerbose(isset($options['v']));
|
||||
|
||||
Datastore::init($options);
|
||||
|
||||
|
Reference in New Issue
Block a user