logs_vault 0.0.5 copy "logs_vault: ^0.0.5" to clipboard
logs_vault: ^0.0.5 copied to clipboard

A Flutter package for seamless logging and storage of application logs into a database

Logs Vault #

Logs Vault is a Flutter package that simplifies logging and storage of application logs into a database. It provides an efficient and customizable solution for managing logs while ensuring data integrity and security.

Features #

  • 💙 Made for Flutter. Easy to use, no config, no boilerplate
  • 🚀 Highly scalable The sky is the limit (pun intended)
  • 🦄 Open source. Everything is open source and free forever!

How to Use #

In your main() function, initialize the Isar database. You need to pass the relevant schemas (LogSchema and LogsVaultSchema) to the Isar.open function. You can also specify the directory where the database files will be stored.

late final Isar isar;

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  final dir = await getApplicationDocumentsDirectory();
  isar = await Isar.open(
    [
      LogSchema,
      LogsVaultSchema,
    ],
    directory: dir.path,
  );
}

After initializing the Isar database, you should call the initLogVault function from the "logs_vault" library. This function initializes the logging system using the provided Isar instance and enables database storage for logs

Future<void> main() async {
  // ...
  initLogVault(isarObj: isar, useDB: true);
  runApp(const MyApp());
}

That's it! You've successfully integrated the "logs_vault" library into your Flutter application. Your app is now ready to log messages and store them in the Isar database using the features provided by the library.

You can store and show logs by using the following method:


logVault.info("Hello World!");
logVault.fine("Hello World!");
logVault.shout("Hello World!");
logVault.warning("Hello World!");
.
.
.

You can export logs by using the following method:


exportLogVault(isarObj: isar,fileLocation:"yourLocation\vault.txt");

Here is the exported log file

Thank You For Reading this far :) #

5
likes
120
pub points
32%
popularity

Publisher

unverified uploader

A Flutter package for seamless logging and storage of application logs into a database

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter, intl, isar, logger, logging

More

Packages that depend on logs_vault