Skip to content

Commit 438d8fe

Browse files
author
Guillaume Labat
committed
refactor(QueryClient): use internal logger
1 parent 65214c3 commit 438d8fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/queryClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import { onlineManager } from './onlineManager'
3838
import { notifyManager } from './notifyManager'
3939
import { infiniteQueryBehavior } from './infiniteQueryBehavior'
4040
import { CancelOptions } from './types'
41+
import { getLogger } from './logger'
4142

4243
// TYPES
4344

@@ -559,7 +560,7 @@ export class QueryClient {
559560
)
560561
// It is ok not having defaults, but it is error prone to have more than 1 default for a given key
561562
if (process.env.NODE_ENV !== 'production' && matchingDefaults?.length > 1) {
562-
console.warn(
563+
getLogger().warn(
563564
`[QueryClient] Several defaults match with key '${JSON.stringify(
564565
queryKey
565566
)}'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.`

0 commit comments

Comments
 (0)