An Extension for Logger That Logs to Firebase Crashlytics

An simple extension for logger that logs to Firebase Crashlytics


final logger = Logger(
    output: MultiOutput(
          if (!kDebugMode && crashlyticsSupported()) FirebaseOutput(),
          // other outputs

By default, it will send all Level.error, Level.warning, and Level.debug logs to Firebase. This can be customized via the levels parameter.

Use this package as a library

Depend on it

Run this command:

With Dart:

 $ dart pub add firebase_logger

This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get):

  firebase_logger: ^1.0.1

Alternatively, your editor might support dart pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:firebase_logger/firebase_logger.dart'; 


import 'package:firebase_logger/src/firebase_output.dart';
import 'package:logger/logger.dart';

void main() {
  var logger = Logger(
      output: MultiOutput(

  try {
    final myList = [];
    final thisWillNotWork = myList[42];
  } on Exception catch (e, stackTrace) {
    logger.e("Uh oh", error: e, stackTrace: stackTrace);

Download details:

Author: percula


#flutter #firebase 

An Extension for Logger That Logs to Firebase Crashlytics
1.05 GEEK