mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Error reporting (#14190)
* Error reporting * Move code to ErrorReportingProvider Enable reporting of error (and warning) messages. report module exceptions * Restore flare key Not needed to set late anymore. We set up filtering before it is initialized. * Remove unnecessary and maybe double Flare report * lint * Cannot use typed properties yet, use phpdoc * fix handleError return type * Filter both exceptions and reports (so we don't miss any) Consolidate the check if reporting should be enabled * Cache reportingEnabled check for the runtime * Split out middleware to improve readability Logging of why reporting is disabled Fix reportingEnabled cache * Style * Return some user data * Change to class based middleware, it looks nicer * Fix error page error id report, add url. * also rewrite intended url * remove link * Move ignition to production and update flare-client Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -47,7 +47,7 @@ class Config
|
||||
public static function load()
|
||||
{
|
||||
// don't reload the config if it is already loaded, reload() should be used for that
|
||||
if (! is_null(self::$config)) {
|
||||
if (self::isLoaded()) {
|
||||
return self::$config;
|
||||
}
|
||||
|
||||
@@ -566,4 +566,14 @@ class Config
|
||||
self::set('db_port', config("database.connections.$db.port", 3306));
|
||||
self::set('db_socket', config("database.connections.$db.unix_socket"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the config has been loaded yet
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isLoaded(): bool
|
||||
{
|
||||
return ! is_null(self::$config);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user