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

@@ -1,6 +1,7 @@
"use client";
import React, { createContext, useContext, useState, useCallback, useEffect } from "react";
import logger from "@/lib/logger";
interface ImageCacheContextType {
cacheVersion: string;
@@ -29,8 +30,7 @@ export function ImageCacheProvider({ children }: { children: React.ReactNode })
const newVersion = Date.now().toString();
setCacheVersion(newVersion);
localStorage.setItem("imageCacheVersion", newVersion);
// eslint-disable-next-line no-console
console.log("🗑️ Image cache flushed - new version:", newVersion);
logger.info(`🗑️ Image cache flushed - new version: ${newVersion}`);
}, []);
const getImageUrl = useCallback(