T
TanStack•7mo ago
solid-orange

Is there a way to disable default logs on server functions in development?

I'm implementing my own logging and the doubling up is a lot. Also: would love to disable the "injected from server" logs that appear in the browser
6 Replies
fascinating-indigo
fascinating-indigo•7mo ago
not yet create a github issue for that, and ideally fix it in a PR 😄 probably we should add a TSR_DEBUG env var, and only if that is set, print those logs
solid-orange
solid-orangeOP•7mo ago
Do you know if this does anything?
export default defineConfig({
tsr: {
disableLogging: true,
},
export default defineConfig({
tsr: {
disableLogging: true,
},
It is in the appconfig type definition, but doesn't seem to do the thing
fascinating-indigo
fascinating-indigo•7mo ago
thats only for the generator
solid-orange
solid-orangeOP•7mo ago
Ah, understood Can you point me to the right place in the code where the logs are created? I can create a PR
fascinating-indigo
fascinating-indigo•7mo ago
best is to search for all the log patterns you want to disable e.g. "injected from server"
unwilling-turquoise
unwilling-turquoise•7mo ago
There was this, feel free to edit to a different env name https://github.com/TanStack/router/pull/2719
GitHub
start: allow disabling server functions logs by kandros · Pull Requ...
Allow disabling serverFn logs in development as requested in https://discord.com/channels/719702312431386674/1304470693970444318 I would like to also make this configurable in app.config.ts but I&a...

Did you find this page helpful?