edge-runtime
edge-runtime copied to clipboard
console.warn logged as error | want help with fixing this bug
Bug report
- [ ] I confirm this is a bug with Supabase, not with my own application.
- [ ] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
https://github.com/supabase/supabase/issues/22395
this bug was posted in the supabase main repo and I have been trying to fix it, it seems like the error is not from that repo but in this one, I want to try and fix it, can you guys point me to where the logging for edge functions is written so I can try and fix it?
To Reproduce
open supabase dashboard and go to edge function logs
Expected behavior
console.warn displays a yellow WARNING log
Screenshots
Thanks for reporting this @EllisCallaghan. Technically, not an edge runtime issue but I'll leave this issue open till we fix it in the Supabase Dashboard.
oh ok cool, just curious where is the code for this? how does the edge functions log work?
@laktek to word that more precisely how does supabase generate data for console logs in edge functions? Thanks!
@EllisCallaghan In the hosted platform, an internal service (closed source) is responsible for piping the edge function logs to the destination. So unfortunately, someone from the internal Supabase team needs to fix it.
ok cool thanks man
Just want to +1 this. Having the same issue. Hoping to have my logging broken up by category so it's easier to track down problems.
Yeah having the same issue :)
Very related to this, the console.info
command filters to logs
rather than info
on the supabase edge function log viewer.
So the mapping I've observed so far is:
javascript function => supabase edge function log severity console.log => log console.info => log console.error => error console.warn => error
+1
p.s. console.debug()
is also grouped in with console.log()
the same way warn()
is with error()
... that's also obviously a bug.
I also having this issue please fix
What's the status of this bug? This seems quite straight-forward to fix.
How is the fix of this bug going? Workaround: insert the category in the log messages and use the search bar to filter them. It is as clunky as it sounds.