Skip to content

Make logger an option instead of globally shared state #3240

Answered by TkDodo
anilanar asked this question in Ideas
Discussion options

You must be logged in to vote

Looking at the code, every single place where getLogger is called already has access to options.

which options are we talking about here? I think it should be an option on the QueryClient. Are you sure there is access to the QueryCient everywhere?

i would generally agree that this is a good idea - would also make it easier to stub out loggers in testing. If you think that works out and we can also get rid of the shared global state, please open a PR against v4 (the alpha branch) 👍

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@anilanar
Comment options

@anilanar
Comment options

Answer selected by anilanar
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