Clean backend debug logging and standardize error reporting.
This removes verbose trace output in handlers/services and keeps only actionable error-level logs.
This commit is contained in:
@@ -276,9 +276,7 @@ func (s *PostService) Like(ctx context.Context, postID, userID string) error {
|
||||
go func() {
|
||||
notifyErr := s.systemMessageService.SendLikeNotification(context.Background(), post.UserID, userID, postID)
|
||||
if notifyErr != nil {
|
||||
fmt.Printf("[DEBUG] Error sending like notification: %v\n", notifyErr)
|
||||
} else {
|
||||
fmt.Printf("[DEBUG] Like notification sent successfully\n")
|
||||
log.Printf("[ERROR] Error sending like notification: %v", notifyErr)
|
||||
}
|
||||
}()
|
||||
}
|
||||
@@ -343,9 +341,7 @@ func (s *PostService) Favorite(ctx context.Context, postID, userID string) error
|
||||
go func() {
|
||||
notifyErr := s.systemMessageService.SendFavoriteNotification(context.Background(), post.UserID, userID, postID)
|
||||
if notifyErr != nil {
|
||||
fmt.Printf("[DEBUG] Error sending favorite notification: %v\n", notifyErr)
|
||||
} else {
|
||||
fmt.Printf("[DEBUG] Favorite notification sent successfully\n")
|
||||
log.Printf("[ERROR] Error sending favorite notification: %v", notifyErr)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user