invertase / dart_edge

Run Dart on the Edge - supporting Vercel & Cloudflare Workers (more coming soon).
https://docs.dartedge.dev
Apache License 2.0
324 stars 23 forks source link

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

Open henry2man opened 1 year ago

henry2man commented 1 year ago

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

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

noga-dev commented 1 year ago

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
henry2man commented 1 year ago

Thanks, I will try print() again 🤔

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

henry2man commented 1 year ago

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?