diff --git a/internal/pdf/service.go b/internal/pdf/service.go index d05dc6d..3df0f01 100644 --- a/internal/pdf/service.go +++ b/internal/pdf/service.go @@ -119,7 +119,7 @@ func (ps PdfService) BuildReport(r *booking.Report, period string, month, year i payload, err := json.Marshal(data) if err != nil { - log.Warnf("Error marshalling JSON:", err) + log.Warnf("Error marshalling JSON: %s", err) return err } @@ -129,7 +129,7 @@ func (ps PdfService) BuildReport(r *booking.Report, period string, month, year i func (ps PdfService) sendData(payload []byte) error { req, err := http.NewRequest("POST", ps.url, bytes.NewBuffer(payload)) if err != nil { - log.Warnf("Error creating request:", err) + log.Warnf("Error creating request: %s", err) return err } @@ -139,7 +139,7 @@ func (ps PdfService) sendData(payload []byte) error { client := &http.Client{} resp, err := client.Do(req) if err != nil { - log.Warnf("Error sending request:", err) + log.Warnf("Error sending request: %s", err) return err } defer resp.Body.Close() diff --git a/internal/server/handle_bookings.go b/internal/server/handle_bookings.go index 9cea81b..0a1d917 100644 --- a/internal/server/handle_bookings.go +++ b/internal/server/handle_bookings.go @@ -255,7 +255,7 @@ func handleCreateItem(bs *booking.Service, cs *calendar.Service, hc *config.Host fmt.Sprintf("Reservation: %s\n %d voyageur(s)\n", b.Name, b.CustomerNumber), b.From, b.To, ); err != nil { - log.Printf("could not create event %w", err) + log.Warnf("could not create event: %s", err) captureError(c, err) }