feat: add pino logging to next
This commit is contained in:
@@ -24,6 +24,9 @@ const config = {
|
||||
images: {
|
||||
domains: [process.env.NEXT_PUBLIC_STORAGE_DOMAIN ?? ""],
|
||||
},
|
||||
experimental: {
|
||||
instrumentationHook: true,
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
@@ -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",
|
||||
|
||||
6
apps/web/src/instrumentation.ts
Normal file
6
apps/web/src/instrumentation.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export async function register() {
|
||||
if (process.env.NEXT_RUNTIME === "nodejs") {
|
||||
await require("pino");
|
||||
await require("next-logger");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user