Merge pull request #991 from openclassify/muammertop

#3540 Sentry Enabled/Disabled add Settings
This commit is contained in:
spektra2147 2021-03-12 14:10:55 +03:00 committed by GitHub
commit 1ccc3d3833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 28 deletions

View File

@ -17,6 +17,7 @@ return [
'hide_price_categories', 'hide_price_categories',
'tcmb_exchange_url', 'tcmb_exchange_url',
'enabled_currencies', 'enabled_currencies',
'disable_sentry',
], ],
], ],
'ads' => [ 'ads' => [

View File

@ -395,31 +395,32 @@ return [
}, },
], ],
], ],
'favicon' => [ 'favicon' => [
'type' => 'anomaly.field_type.file', 'type' => 'anomaly.field_type.file',
], ],
'ads_date_hidden' => [ 'ads_date_hidden' => [
'type' => 'anomaly.field_type.boolean', 'type' => 'anomaly.field_type.boolean',
'config' => [ 'config' => [
'default_value' => false, 'default_value' => false,
] ]
], ],
'hide_listing_header' => [ 'hide_listing_header' => [
'type' => 'anomaly.field_type.boolean', 'type' => 'anomaly.field_type.boolean',
'config' => [ 'config' => [
'default_value' => false, 'default_value' => false,
] ]
], ],
'hide_filter_section' => [ 'hide_filter_section' => [
'type' => 'anomaly.field_type.boolean', 'type' => 'anomaly.field_type.boolean',
'config' => [ 'config' => [
'default_value' => false, 'default_value' => false,
] ]
], ],
'hide_seller_info' => [ 'hide_seller_info' => [
'type' => 'anomaly.field_type.boolean', 'type' => 'anomaly.field_type.boolean',
'config' => [ 'config' => [
'default_value' => false, 'default_value' => false,
] ]
] ],
'disable_sentry' => 'anomaly.field_type.boolean',
]; ];

View File

@ -247,6 +247,9 @@ return [
'name' => 'GET Categories', 'name' => 'GET Categories',
'instructions' => 'It represents the categories in which the GET property will be valid.' 'instructions' => 'It represents the categories in which the GET property will be valid.'
], ],
'disable_sentry' => [
'name' => 'Disable Sentry'
],
'watermark' => [ 'watermark' => [
'name' => 'Watermark', 'name' => 'Watermark',
'instructions' => 'Is watermark active?' 'instructions' => 'Is watermark active?'

View File

@ -87,7 +87,11 @@ class ExceptionHandler extends Handler
public function report(Exception $e) public function report(Exception $e)
{ {
if (app()->bound('sentry') && $this->shouldReport($e)) { if (!setting_value('visiosoft.module.advs::disable_sentry')
&& app()->bound('sentry')
&& $this->shouldReport($e)
&& env('SENTRY_LARAVEL_DSN')) {
app('sentry')->captureException($e); app('sentry')->captureException($e);
} }