flutter_logs_firebase_timber 0.0.4
flutter_logs_firebase_timber: ^0.0.4 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:

Getting started #
Add the package to your pubspec.yaml file:
flutter_logs_firebase_timber: ^0.0.3
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: #
- Select your Firebase project.
- Navigate to Realtime Database:
- Click on "Build" in the left-hand menu, then select "Realtime Database".
- Open the Rules Tab:
- Click on the "Rules" tab in the Realtime Database section.
- 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"
}
}
- 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!