firebase / firebase-tools-ui

A local-first UI for Firebase Emulator Suite.
https://firebase.googleblog.com/2020/05/local-firebase-emulator-ui.html
Apache License 2.0
261 stars 60 forks source link

Add option to send logs to GCP from Functions #1028

Open exo-pla-net opened 2 months ago

exo-pla-net commented 2 months ago

Cloud Error Reporting has an option to fire off live reports, even in the emulator:

import {ErrorReporting} from '@google-cloud/error-reporting';
new ErrorReporting(
reportMode: 'always',
)

It would be nice if you could do so using Logger, as well, so you can test your project-wide error handling.

import {
  error as errorLog,
} from "firebase-functions/logger";
errorLog("I'm live!", {bypassEmulator: true})