diff --git a/app/src/Controller/API/Ventas.php b/app/src/Controller/API/Ventas.php index ddfbe73..571cdfc 100644 --- a/app/src/Controller/API/Ventas.php +++ b/app/src/Controller/API/Ventas.php @@ -218,7 +218,7 @@ class Ventas extends Controller $output['venta_id'] = $venta->id; $output['status'] = true; } catch (Create | Update $exception) { - $this->logger->error($exception->getMessage()); + $this->logger->error($exception); $output['errors'] = [ 'code' => $exception->getCode(), 'message' => $exception->getMessage(), diff --git a/app/src/Service/Contabilidad/Cartola.php b/app/src/Service/Contabilidad/Cartola.php index bfc5120..85aca2b 100644 --- a/app/src/Service/Contabilidad/Cartola.php +++ b/app/src/Service/Contabilidad/Cartola.php @@ -280,7 +280,7 @@ class Cartola extends Service try { return $this->movimientoRepository->save($movimiento); } catch (PDOException $exception) { - $this->logger->critical(var_export($data,true)); + $this->logger->critical($exception, ['data' => $data]); throw $exception; } }