Firebase Log Monitoring with LogMonitor
>_ why firebase apps need log monitoring
Firebase Cloud Functions logs are buried in the Google Cloud Console, which is slow to navigate and difficult to search. For Flutter+Firebase apps, client-side logs are invisible unless you set up explicit logging. LogMonitor gives you a single Live Console that streams logs from both your Cloud Functions and your client-side Firebase app.
>_ how logmonitor works with firebase
For Cloud Functions, install the logmonitor-js SDK and call logmonitor.init() in your function entry point. The SDK auto-patches console.log, console.info, console.warn, console.error, and console.debug. For Flutter apps using Firebase, add the logmonitor_flutter SDK. Both stream logs to the same LogMonitor Live Console, giving you end-to-end visibility across your entire Firebase stack. Logs are only sent in production (when process.env.NODE_ENV === 'production').
>_ quick start
const functions = require('firebase-functions');const { logmonitor } = require('logmonitor-js');logmonitor.init({ apiKey: 'your-api-key' });exports.onUserCreated = functions.auth.user().onCreate((user) => { console.log('New user created', { uid: user.uid, email: user.email }); return sendWelcomeEmail(user.email);});exports.processOrder = functions.firestore .document('orders/{orderId}') .onCreate(async (snap, context) => { console.log('Order created', { orderId: context.params.orderId, data: snap.data() }); try { await fulfillOrder(snap.data()); } catch (err) { console.error('Order fulfillment failed', { error: err.message }); } });>_ what you can monitor
- $Cloud Function invocation errors and timeouts
- $Firestore trigger and write failures
- $Authentication events and sign-in errors
- $Cloud Messaging delivery issues
- $Client-side Flutter or web app errors
- $Firebase Storage upload and download failures
>_ frequently asked questions
LogMonitor complements Crashlytics. Crashlytics aggregates crash reports, while LogMonitor provides real-time log streaming and per-user debugging with Log Switch. Use both for full visibility.
Yes. Use logmonitor-js for Cloud Functions and logmonitor_flutter for your Flutter app. Both send logs to the same LogMonitor dashboard so you can trace issues across client and server.
Yes. The logmonitor-js SDK works the same way in the Firebase Emulator Suite as in production. You can test your logging setup locally before deploying.
Add console.log or console.error calls inside your Cloud Function handlers. The logmonitor-js SDK captures them automatically and streams them to your Live Console with the function name and trigger context.
Firebase's logging requires navigating the Google Cloud Console and has limited search and filtering. LogMonitor provides a real-time Live Console, structured metadata search, per-user Log Switch, and a simpler interface designed for fast debugging.