Reduce flooding of logs from Perfex CRM

This commit is contained in:
Dillon
2023-04-15 20:58:21 +08:00
parent cfec4c58b2
commit c1b53973e5
4 changed files with 32 additions and 4 deletions
+19 -1
View File
@@ -2,6 +2,7 @@
namespace App\Classes\General;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Str;
@@ -24,4 +25,21 @@ class Helper
return array_slice(get_class_methods($className), 1);
}
}
/**
* @param $log
* @return array
*/
static function debugLoggerForPerfexCRM($log){
if($log){
$message = $log['message'];
$substring = 'No data were found';
if (isset($message)) {
if (strpos($message, $substring) !== false) {
// Log::info('Message exist');
} else {
Log::info($log['message']);
}
}
}
}
}