Skip to content

Use of custom logger for controlling test output #5149

Answered by TkDodo
LauSam09 asked this question in Ideas
Discussion options

You must be logged in to vote

the custom logger is deprecated because we have removed it in v5. The stance is:

  • The custom logger doesn't do anything in production, because it's turned off completely. You also can't enable it.
  • The logger was meant to log things developers should pay attention to, not request errors.

so starting with v5, we:

  • always log directly with console.warn or console.error, but only in DEV mode.
  • we only log things that you should take attention to, like returning undefined from your queryFn, which is invalid.
  • failing queries will not longer be logged

you can still use the custom logger in v4, but be prepared to just remove it in v5 because you won't be needing it.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LauSam09
Comment options

Answer selected by LauSam09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants