feat: add pino logging to next

This commit is contained in:
Henry
2025-05-15 22:56:01 +01:00
parent d065ae73e1
commit bb9877c899
4 changed files with 120 additions and 0 deletions

View File

@@ -24,6 +24,9 @@ const config = {
images: {
domains: [process.env.NEXT_PUBLIC_STORAGE_DOMAIN ?? ""],
},
experimental: {
instrumentationHook: true,
},
};
export default config;

View File

@@ -34,7 +34,9 @@
"js-cookie": "^3.0.5",
"jwt-decode": "^4.0.0",
"next": "^14.2.15",
"next-logger": "^5.0.1",
"nextjs-cors": "^2.2.0",
"pino": "^9.6.0",
"react": "catalog:react18",
"react-beautiful-dnd": "^13.1.1",
"react-contenteditable": "^3.3.7",

View File

@@ -0,0 +1,6 @@
export async function register() {
if (process.env.NEXT_RUNTIME === "nodejs") {
await require("pino");
await require("next-logger");
}
}