mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-10 22:15:13 +00:00
refactor: Replace fmt.Printf with structured logging using logrus in api-server subscriber and invoice services
- Add logrus import to invoice.go, subscriber_crud.go, subscriber_esim.go, and subscriber_lifecycle.go - Replace fmt.Printf with logrus.WithError and WithField for structured error logging - Update invoice email notification placeholder to use logrus.Info with invoice_id field - Replace eSIM provisioning error print with logrus.Warn including subscriber_id field - Add comment explaining derived
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
|
||||
"github.com/nutcas3/telecom-platform/apps/api-server/internal/database"
|
||||
"github.com/nutcas3/telecom-platform/apps/api-server/internal/models"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// InvoiceService handles invoice generation and management
|
||||
@@ -100,8 +101,9 @@ func (s *InvoiceService) SendInvoice(ctx context.Context, invoiceID uint) error
|
||||
return fmt.Errorf("failed to update invoice status: %w", err)
|
||||
}
|
||||
|
||||
// TODO: Send email notification
|
||||
// This would integrate with an email service
|
||||
// Email notification would be sent here via notification service
|
||||
// This is a placeholder for future integration with email service
|
||||
logrus.WithField("invoice_id", invoice.ID).Info("Invoice created - email notification pending")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user