feat: add logging enhancements by integrating pino and pino-pretty for improved error tracking and debugging across the application

This commit is contained in:
Julien Froidefond
2025-10-26 06:15:47 +01:00
parent 7cc72dc13d
commit 52350a43d9
84 changed files with 455 additions and 177 deletions

View File

@@ -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"),