mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Allow dumping of errors and warnings (#14275)
`lnms config:set reporting.error.dump true`
This commit is contained in:
@@ -46,6 +46,10 @@ class ErrorReportingProvider extends \Facade\Ignition\IgnitionServiceProvider
|
||||
public function boot(): void
|
||||
{
|
||||
Flare::filterExceptionsUsing(function (\Exception $e) {
|
||||
if (Config::get('reporting.error.dump')) {
|
||||
dump('Exception: ' . $e->getMessage(), $e->getFile() . ':' . $e->getLine());
|
||||
}
|
||||
|
||||
return $this->isReportingEnabled();
|
||||
});
|
||||
|
||||
|
||||
@@ -4853,6 +4853,14 @@
|
||||
"git": "Git"
|
||||
}
|
||||
},
|
||||
"reporting.error": {
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"reporting.error.dump": {
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
},
|
||||
"rewrite_if": {
|
||||
"type": "array"
|
||||
},
|
||||
@@ -5611,10 +5619,6 @@
|
||||
"section": "smokeping",
|
||||
"order": 3,
|
||||
"type": "text"
|
||||
},
|
||||
"reporting.error": {
|
||||
"default": false,
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user