Hook up librenms cli debug (#9632)

* Hook up librenms cli debug

* forgot to add function exists check, good travis-ci :)
This commit is contained in:
Tony Murray
2019-01-09 19:36:32 -06:00
committed by GitHub
parent 8174b9a13c
commit 5cdc49df1b
4 changed files with 83 additions and 29 deletions

View File

@@ -51,4 +51,18 @@ class Kernel extends ConsoleKernel
return $this->artisan;
}
public function handle($input, $output = null)
{
// intercept input and check for debug
if ($input->hasParameterOption(['-d', '--debug', '-vv', '-vvv'], true)) {
if ($input->hasParameterOption(['-vvv'], true)) {
global $vdebug;
$vdebug = true;
}
$this->app->booted('set_debug');
}
return parent::handle($input, $output);
}
}