chore: add granular logging to the logger (#16734)
* Update README.md * Update README.md * Update README.md * Update README.md * Update turbo.json * Update trpc-provider.tsx * Update logger.ts * update prisma index * Update trpc.ts * Update trpc-provider.tsx * Update trpc.ts * Update .env.example * Update logger.ts
This commit is contained in:
1 parent
e0922c5ee0
commit
c4a1382982
7 files changed
+48
-7
No files matched your search
@@ -55,7 +55,7 @@ export const TrpcProvider: React.FC<{ children: React.ReactNode; dehydratedState
|
||||
// adds pretty logs to your console in development and logs errors in production
|
||||
loggerLink({
|
||||
enabled: (opts) =>
|
||||
!!process.env.NEXT_PUBLIC_DEBUG || (opts.direction === "down" && opts.result instanceof Error),
|
||||
(typeof process.env.NEXT_PUBLIC_LOGGER_LEVEL === 'number' && process.env.NEXT_PUBLIC_LOGGER_LEVEL >= 0) || (opts.direction === "down" && opts.result instanceof Error),
|
||||
}),
|
||||
splitLink({
|
||||
// check for context property `skipBatch`
|
||||
|
||||
Reference in new issue
Block a user