edge-runtime icon indicating copy to clipboard operation
edge-runtime copied to clipboard

console.warn logged as error | want help with fixing this bug

Open EllisCallaghan opened this issue 10 months ago • 10 comments

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

Screenshot from 2024-04-04 14-15-31 Screenshot from 2024-04-04 14-15-05

EllisCallaghan avatar Apr 04 '24 06:04 EllisCallaghan

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.

laktek avatar Apr 04 '24 06:04 laktek

oh ok cool, just curious where is the code for this? how does the edge functions log work?

EllisCallaghan avatar Apr 04 '24 06:04 EllisCallaghan

@laktek to word that more precisely how does supabase generate data for console logs in edge functions? Thanks!

EllisCallaghan avatar Apr 04 '24 06:04 EllisCallaghan

@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.

laktek avatar Apr 04 '24 06:04 laktek

ok cool thanks man

EllisCallaghan avatar Apr 04 '24 06:04 EllisCallaghan

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.

jareddr avatar May 06 '24 17:05 jareddr

Yeah having the same issue :)

michaelmagan avatar May 06 '24 20:05 michaelmagan

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

image

jareddr avatar May 06 '24 20:05 jareddr

+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.

michelcrypt4d4mus avatar Jun 10 '24 02:06 michelcrypt4d4mus

I also having this issue please fix

cfowler650 avatar Aug 02 '24 15:08 cfowler650

What's the status of this bug? This seems quite straight-forward to fix.

ManuelSch avatar Dec 27 '24 13:12 ManuelSch

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.

hexa-nimbo avatar Jan 03 '25 11:01 hexa-nimbo