mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added verbose debugging, normal debugging will now try and mask certain information
This commit is contained in:
18
alerts.php
18
alerts.php
@ -28,6 +28,8 @@
|
||||
require_once 'includes/defaults.inc.php';
|
||||
require_once 'config.php';
|
||||
|
||||
$options = getopt('d::');
|
||||
|
||||
$lock = false;
|
||||
if (file_exists($config['install_dir'].'/.alerts.lock')) {
|
||||
$pids = explode("\n", trim(`ps -e | grep php | awk '{print $1}'`));
|
||||
@ -48,6 +50,22 @@ require_once $config['install_dir'].'/includes/definitions.inc.php';
|
||||
require_once $config['install_dir'].'/includes/functions.php';
|
||||
require_once $config['install_dir'].'/includes/alerts.inc.php';
|
||||
|
||||
if (isset($options['d'])) {
|
||||
echo "DEBUG!\n";
|
||||
$debug = true;
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
ini_set('log_errors', 1);
|
||||
ini_set('error_reporting', 1);
|
||||
}
|
||||
else {
|
||||
$debug = false;
|
||||
// ini_set('display_errors', 0);
|
||||
ini_set('display_startup_errors', 0);
|
||||
ini_set('log_errors', 0);
|
||||
// ini_set('error_reporting', 0);
|
||||
}
|
||||
|
||||
if (!defined('TEST') && $config['alert']['disable'] != 'true') {
|
||||
echo 'Start: '.date('r')."\r\n";
|
||||
echo "RunFollowUp():\r\n";
|
||||
|
Reference in New Issue
Block a user