invertase / dart_edge

Run Dart on the Edge - supporting Vercel & Cloudflare Workers (more coming soon).

Home Page:https://docs.dartedge.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to implement functions logging (`print()` or whatever else)

henry2man opened this issue · comments

Plain print() calls now generate INFO messages on Supabase.

How can we implement a full logging system with different logging levels?

Workaround for now:

  1. Add the dependency js_bindings.

  2. Add the import import 'package:js_bindings/js_bindings.dart' as interop;

  3. call interop.window.console.log('logging');

Edit:

Nvm apparently print does the same.
image

Thanks, I will try print() again 🤔

Nevertheless we need something that is traced in Supabase functions console.

Hi there.

It looks that plain print() calls are making the job now!

Captura de pantalla 2023-05-25 a las 13 28 11

Should we add some references in docs to this?