Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks
EllisCallaghan opened this issue Apr 4, 2024 · 8 comments
Open
2 tasks
Assignees
Labels
bug Something isn't working

Comments

@EllisCallaghan
Copy link

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

supabase/supabase#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 EllisCallaghan added the bug Something isn't working label Apr 4, 2024
@laktek laktek self-assigned this Apr 4, 2024
@laktek
Copy link
Contributor

laktek commented Apr 4, 2024

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.

@EllisCallaghan
Copy link
Author

EllisCallaghan commented Apr 4, 2024

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

@EllisCallaghan
Copy link
Author

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

@laktek
Copy link
Contributor

laktek commented Apr 4, 2024

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

@EllisCallaghan
Copy link
Author

ok cool thanks man

@jareddr
Copy link

jareddr commented May 6, 2024

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.

@michaelmagan
Copy link

Yeah having the same issue :)

@jareddr
Copy link

jareddr commented May 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants