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:
Tony Murray
2021-04-29 22:42:18 -05:00
committed by GitHub
parent 2cdd762656
commit 61c89794e4
51 changed files with 287 additions and 278 deletions

View File

@@ -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);