Add descriptive messages to library log output

This commit is contained in:
Alex Tselegidis 2022-06-20 12:09:56 +03:00
parent 0d5e60cdb7
commit 32ed2c32e6
3 changed files with 9 additions and 8 deletions

View File

@ -187,7 +187,7 @@ class Notifications {
} }
catch (Throwable $e) catch (Throwable $e)
{ {
log_message('error', $e->getMessage()); log_message('error', 'Notifications - Could not email confirmation details of appointment (' . ($appointment['id'] ?? '-') . ') : ' . $e->getMessage());
log_message('error', $e->getTraceAsString()); log_message('error', $e->getTraceAsString());
} }
} }
@ -299,7 +299,7 @@ class Notifications {
} }
catch (Throwable $e) catch (Throwable $e)
{ {
log_message('error', $e->getMessage()); log_message('error', 'Notifications - Could not email cancellation details of appointment (' . ($appointment['id'] ?? '-') . ') : ' . $e->getMessage());
log_message('error', $e->getTraceAsString()); log_message('error', $e->getTraceAsString());
} }
} }

View File

@ -70,7 +70,7 @@ class Synchronization {
$google_event = $this->CI->google_sync->add_appointment( $google_event = $this->CI->google_sync->add_appointment(
$appointment, $appointment,
$provider, $provider,
$webhook, $service,
$customer, $customer,
$settings $settings
); );
@ -84,7 +84,7 @@ class Synchronization {
$this->CI->google_sync->update_appointment( $this->CI->google_sync->update_appointment(
$appointment, $appointment,
$provider, $provider,
$webhook, $service,
$customer, $customer,
$settings $settings
); );
@ -92,7 +92,7 @@ class Synchronization {
} }
catch (Throwable $e) catch (Throwable $e)
{ {
log_message('error', $e->getMessage()); log_message('error', 'Synchronization - Could not sync confirmation details of appointment (' . ($appointment['id'] ?? '-') . ') : ' . $e->getMessage());
log_message('error', $e->getTraceAsString()); log_message('error', $e->getTraceAsString());
} }
} }
@ -126,7 +126,7 @@ class Synchronization {
} }
catch (Throwable $e) catch (Throwable $e)
{ {
log_message('error', $e->getMessage()); log_message('error', 'Synchronization - Could not sync cancellation details of appointment (' . ($appointment['id'] ?? '-') . ') : ' . $e->getMessage());
log_message('error', $e->getTraceAsString()); log_message('error', $e->getTraceAsString());
} }
} }
@ -170,7 +170,7 @@ class Synchronization {
} }
catch (Throwable $e) catch (Throwable $e)
{ {
log_message('error', $e->getMessage()); log_message('error', 'Synchronization - Could not sync cancellation details of unavailability (' . ($appointment['id'] ?? '-') . ') : ' . $e->getMessage());
log_message('error', $e->getTraceAsString()); log_message('error', $e->getTraceAsString());
} }
} }
@ -203,7 +203,7 @@ class Synchronization {
} }
catch (Throwable $e) catch (Throwable $e)
{ {
log_message('error', $e->getMessage()); log_message('error', 'Synchronization - Could not sync cancellation details of unavailability (' . ($appointment['id'] ?? '-') . ') : ' . $e->getMessage());
log_message('error', $e->getTraceAsString()); log_message('error', $e->getTraceAsString());
} }
} }

View File

@ -87,6 +87,7 @@ class Webhooks_client {
catch (Throwable $e) catch (Throwable $e)
{ {
log_message('error', 'Webhooks Client - The webhook (' . ($webhook['id'] ?? NULL) . ') request received an unexpected exception: ' . $e->getMessage()); log_message('error', 'Webhooks Client - The webhook (' . ($webhook['id'] ?? NULL) . ') request received an unexpected exception: ' . $e->getMessage());
log_message('error', $e->getTraceAsString());
} }
} }
} }