Silence trpc logging by default (#1949)
Co-authored-by: Bailey Pumfleet <[email protected]> Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
2 files changed
+9
-2
No files matched your search
@@ -45,8 +45,7 @@ export default withTRPC<AppRouter>({
|
||||
// adds pretty logs to your console in development and logs errors in production
|
||||
loggerLink({
|
||||
enabled: (opts) =>
|
||||
process.env.NODE_ENV === "development" ||
|
||||
(opts.direction === "down" && opts.result instanceof Error),
|
||||
!!process.env.NEXT_PUBLIC_DEBUG || (opts.direction === "down" && opts.result instanceof Error),
|
||||
}),
|
||||
httpBatchLink({
|
||||
url: `/api/trpc`,
|
||||
|
||||
Reference in new issue
Block a user