feat: add logging enhancements by integrating pino and pino-pretty for improved error tracking and debugging across the application
This commit is contained in:
@@ -6,6 +6,7 @@ import { useToast } from "./use-toast";
|
||||
import { ClientOfflineBookService } from "@/lib/services/client-offlinebook.service";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import logger from "@/lib/logger";
|
||||
|
||||
interface MarkAsReadButtonProps {
|
||||
bookId: string;
|
||||
@@ -49,7 +50,7 @@ export function MarkAsReadButton({
|
||||
});
|
||||
onSuccess?.();
|
||||
} catch (error) {
|
||||
console.error("Erreur lors de la mise à jour du progresseur de lecture:", error);
|
||||
logger.error({ err: error }, "Erreur lors de la mise à jour du progresseur de lecture:");
|
||||
toast({
|
||||
title: t("books.actions.markAsRead.error.title"),
|
||||
description: t("books.actions.markAsRead.error.description"),
|
||||
|
||||
Reference in New Issue
Block a user