Merge branch 'dillon/55-billplz-fix' into 'master'

Update info log location for vue polling related stuff + perfexcrm integration

See merge request CIEFWorldwideSdnBhd/shipping-portal!211
This commit is contained in:
Dillon Ngo
2024-03-18 12:17:11 +00:00
25 changed files with 37 additions and 25 deletions
@@ -65,7 +65,7 @@ abstract class AbstractControllerLogic
} catch (ErrorException|GeneralExceptions|TypeError $exception){
if ($exception instanceof JobResourceNotFoundException) {
Log::channel('storage_invoices')->info(sprintf(
Log::channel('vue_polling')->info(sprintf(
"Uncaught exception '%s' with message '%s' in %s:%d",
get_class($exception),
$exception->getMessage(),
+2 -2
View File
@@ -47,7 +47,7 @@ class UpdatePerfexCRMInvoice implements ShouldQueue
$invoiceId = 0;
$invoiceStatus = 0;
$invoice = (App()->make(FetchesPerfexCRMInvoice::class))->execute($customer->userid,"INV-", $transaction->owner->bill_no);
Log::error('UpdatePerfexCRMInvoice debug bill_no: ' . $transaction->owner->bill_no . ', Project Id: ' . $this->updatePerfexCRMInvoiceObject->getProjectId());
Log::channel('perfex_crm')->info('UpdatePerfexCRMInvoice debug bill_no: ' . $transaction->owner->bill_no . ', Project Id: ' . $this->updatePerfexCRMInvoiceObject->getProjectId());
if(is_null($invoice)){
$result = (App()->make(CreatePerfexCRMInvoiceProcessor::class))->execute($transaction->owner, $this->updatePerfexCRMInvoiceObject->getIsPaid());
@@ -55,7 +55,7 @@ class UpdatePerfexCRMInvoice implements ShouldQueue
$invoiceId = $result->payload['id'];
} else {
// Log::error(json_encode('UpdatePerfexCRMInvoice CreatePerfexCRMInvoiceProcessor failed'));
Helper::debugLogger('UpdatePerfexCRMInvoice CreatePerfexCRMInvoiceProcessor failed');
Log::channel('perfex_crm')->info('UpdatePerfexCRMInvoice CreatePerfexCRMInvoiceProcessor failed');
}
}
else{
@@ -61,7 +61,7 @@ class FetchPerfexCRMInvoiceProcessor
$invoiceId = $result->payload['id'];
} else {
$log['message'] = 'FetchPerfexCRMInvoiceProcessor failed for transaction > bill_no: '.$number;
Helper::debugLogger($log);
Log::channel('perfex_crm')->info($log);
}
}
else{
@@ -25,7 +25,7 @@ class ConvertsPerfexCRMLeadToCustomer
return (object) $data;
}else{
Log::error('ConvertsPerfexCRMLeadToCustomer: '.$response);
Log::channel('perfex_crm')->info('ConvertsPerfexCRMLeadToCustomer: '.$response);
return null;
}
}
@@ -28,7 +28,7 @@ class CreatesPerfexCRMCustomer
$data = $response->json();
return (object) $data;
}else{
Log::error('CreatesPerfexCRMCustomer: '.$response);
Log::channel('perfex_crm')->info('CreatesPerfexCRMCustomer: '.$response);
return null;
}
}
@@ -35,7 +35,7 @@ class CreatesPerfexCRMCustomerContact
$data = $response->json();
return (object) $data;
}else{
Log::error('CreatesPerfexCRMCustomerContact: '.$response);
Log::channel('perfex_crm')->info('CreatesPerfexCRMCustomerContact: '.$response);
return null;
}
}
@@ -34,7 +34,7 @@ class CreatesPerfexCRMCustomerProject
$data = $response->json();
return (object) $data;
}else{
Log::error('CreatesPerfexCRMCustomerProject: '.$response);
Log::channel('perfex_crm')->info('CreatesPerfexCRMCustomerProject: '.$response);
return null;
}
}
@@ -54,7 +54,7 @@ class CreatesPerfexCRMInvoice
$data = $response->json();
return (object) $data;
}else{
Log::error('CreatesPerfexCRMInvoice: '.$response);
Log::channel('perfex_crm')->info('CreatesPerfexCRMInvoice: '.$response);
return null;
}
}
@@ -34,7 +34,7 @@ class CreatesPerfexCRMInvoicePayment
$data = $response->json();
return (object) $data;
}else{
Log::error('CreatesPerfexCRMInvoicePayment: '.$response);
Log::channel('perfex_crm')->info('CreatesPerfexCRMInvoicePayment: '.$response);
return null;
}
}
@@ -41,7 +41,7 @@ class CreatesPerfexCRMLead
$data = $response->json();
return (object) $data;
}else{
Log::error('CreatesPerfexCRMLead: '.$response);
Log::channel('perfex_crm')->info('CreatesPerfexCRMLead: '.$response);
return null;
}
}
@@ -37,7 +37,7 @@ class CreatesPerfexCRMMilestone
$data = $response->json();
return (object) $data;
}else{
Log::error('CreatesPerfexCRMMilestone: '.$response);
Log::channel('perfex_crm')->info('CreatesPerfexCRMMilestone: '.$response);
return null;
}
}
@@ -34,7 +34,7 @@ class CreatesPerfexCRMSupportTicket
$data = $response->json();
return (object) $data;
}else{
Log::error($response);
Log::channel('perfex_crm')->info($response);
return null;
}
}
@@ -58,7 +58,7 @@ class CreatesPerfexCRMTask
$data = $response->json();
return (object) $data;
}else{
Log::error('CreatesPerfexCRMTask: '.$response);
Log::channel('perfex_crm')->info('CreatesPerfexCRMTask: '.$response);
return null;
}
}
@@ -25,7 +25,7 @@ class FetchesPerfexCRMCustomer
return (object) $data;
}else{
Log::error('FetchesPerfexCRMCustomer: '.$response);
Log::channel('perfex_crm')->info('FetchesPerfexCRMCustomer: '.$response);
return null;
}
}
@@ -27,7 +27,7 @@ class FetchesPerfexCRMInvoice
return (object) $data;
}else{
Log::error('FetchesPerfexCRMInvoice: '.$response);
Log::channel('perfex_crm')->info('FetchesPerfexCRMInvoice: '.$response);
return null;
}
}
@@ -25,7 +25,7 @@ class FetchesPerfexCRMLead
return (object) $data;
}else{
Log::error('FetchesPerfexCRMLead: '.$response);
Log::channel('perfex_crm')->info('FetchesPerfexCRMLead: '.$response);
return null;
}
}
@@ -31,7 +31,7 @@ class FetchesPerfexCRMMilestone
return (object) $data;
}else{
Log::error('FetchesPerfexCRMMilestone: '.$response);
Log::channel('perfex_crm')->info('FetchesPerfexCRMMilestone: '.$response);
return null;
}
}
@@ -31,7 +31,7 @@ class FetchesPerfexCRMProject
return (object) $data;
}else{
Log::error('FetchesPerfexCRMProject: '.$response);
Log::channel('perfex_crm')->info('FetchesPerfexCRMProject: '.$response);
return null;
}
}
@@ -45,7 +45,7 @@ class FetchesPerfexCRMTask
return (object) $data;
}else{
Helper::debugLogger($response);
Log::channel('perfex_crm')->info($response);
return null;
}
}
@@ -39,7 +39,7 @@ class UpdatesPerfexCRMCustomer
$data = $response->json();
return (object) $data;
}else{
// Helper::debugLogger($response);
// Log::channel('perfex_crm')->info($response);
return null;
}
}
@@ -61,7 +61,7 @@ class UpdatesPerfexCRMInvoice
$data = $response->json();
return (object) $data;
}else{
Log::error('UpdatesPerfexCRMInvoice: '.$response);
Log::channel('perfex_crm')->info('UpdatesPerfexCRMInvoice: '.$response);
return null;
}
}
@@ -42,7 +42,7 @@ class UpdatesPerfexCRMLead
$data = $response->json();
return (object) $data;
}else{
Log::error('UpdatesPerfexCRMLead: '.$response);
Log::channel('perfex_crm')->info('UpdatesPerfexCRMLead: '.$response);
return null;
}
}
@@ -34,7 +34,7 @@ class UpdatesPerfexCRMProject
$data = $response->json();
return (object) $data;
}else{
Log::error('UpdatesPerfexCRMProject: '.$response);
Log::channel('perfex_crm')->info('UpdatesPerfexCRMProject: '.$response);
return null;
}
}
@@ -39,7 +39,7 @@ class UpdatesPerfexCRMTask
$data = $response->json();
return (object) $data;
}else{
Log::error('UpdatesPerfexCRMTask: '.$response);
Log::channel('perfex_crm')->info('UpdatesPerfexCRMTask: '.$response);
return null;
}
}
+12
View File
@@ -112,6 +112,18 @@ return [
'path' => storage_path('logs/paymentUnknownOrderLog.log'),
'level' => 'info',
],
'vue_polling' => [
'driver' => 'single',
'path' => storage_path('logs/laravel_vue_plling.log'),
'level' => 'info',
],
'perfex_crm' => [
'driver' => 'single',
'path' => storage_path('logs/laravel_perfex_crm.log'),
'level' => 'info',
],
],
];