Custom Logger

If you want to change how information is logged by React Query, you can set a custom logger when creating a QueryClient.

const queryClient = new QueryClient({
logger: {
log: (...args) => {
// Log debugging information
},
warn: (...args) => {
// Log warning
},
error: (...args) => {
// Log error
},
},
})
Was this page helpful?

Resources

Subscribe to our newsletter

The latest TanStack news, articles, and resources, sent to your inbox.

    I won't send you spam.

    Unsubscribe at any time.

    © 2020 Tanner Linsley. All rights reserved.