prismatrpct3

In T3 Stack project, I'm getting query logs in console of browser, How can I stop it?


I have T3 stack project and I'm fetching data using trpc and prisma, but It's showing logs in browsers console.enter image description here

How can I stop this logs?


Solution

  • You probably have loggerLink enabled in your config, just check for it and pass enabled: () => false if you want to disable it, or just remove it completely.

    export const trpc = createTRPCNext<AppRouter>({
      config() {
        return {
          links: [
            loggerLink({
              // Use whatever condition you want here
              enabled: (opts) => false,
            }),
          ],
        };
      },
    });