flutter_logs_firebase_timber 0.0.3 copy "flutter_logs_firebase_timber: ^0.0.3" to clipboard
flutter_logs_firebase_timber: ^0.0.3 copied to clipboard

FlutterLogsFirebaseTimber is a logging package for Flutter, similar to Android's Timber.

FlutterLogsFirebaseTimber is a logging package for Flutter, similar to Android's Timber. This package allows you to track logs both locally and remotely using Firebase Realtime Database.

Features #

  • Track logs remotely and locally.
  • Monitor application logs in the Firebase console.
  • Easy to use.
  • Realtime database screenshot:

[Realtime firebase logs]

Getting started #

Add the package to your pubspec.yaml file: flutter_logs_firebase_timber 0.0.1

Firebase Setup #

  • Create a Firebase project in the Firebase console.
  • Register your app by clicking the Flutter icon in the Project Overview section.
  • Follow the given instructions for CLI setup.

A. Configure Firebase Realtime Database rules for public read and write access: #

  1. Select your Firebase project.
  2. Navigate to Realtime Database:
  • Click on "Build" in the left-hand menu, then select "Realtime Database".
  1. Open the Rules Tab:
  • Click on the "Rules" tab in the Realtime Database section.
  1. Set Public Read and Write Access:
  • Replace the existing rules with the following code to allow public read and write access. Note that setting public access is generally not recommended for production applications due to security risks. Use this configuration only for testing or development purposes.

{

"rules": {

".read": "true",

".write": "true"

}

}

  1. Click the "Publish" button to apply the changes.

Important Note: #

  • Setting .read and .write to true allows anyone with the database URL to read and write data, posing significant security risks. For production environments, implement proper security rules to protect your data. For example, allow access only to authenticated users:

{

"rules": {

".read": "auth != null",

".write": "auth != null"

}

}

Example #

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  //Initialze the package only for debug mode
  if (kDebugMode) {
    await FlutterLogsFirebaseTimber.initialize();
  }
  runApp(const MyApp());
}

Usage #

FlutterLogsFirebaseTimber.log(
                logLevel: LogLevel.info,
                tag: "onPressed()",
                message: "This is a log message",
                error: null)

Additional information #

We hope you find FlutterLogsFirebaseTimber useful!

5
likes
0
points
13
downloads

Publisher

unverified uploader

Weekly Downloads

FlutterLogsFirebaseTimber is a logging package for Flutter, similar to Android's Timber.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

device_info_plus, firebase_core, firebase_database, flutter, intl, package_info_plus

More

Packages that depend on flutter_logs_firebase_timber