seq_logger 1.0.5 copy "seq_logger: ^1.0.5" to clipboard
seq_logger: ^1.0.5 copied to clipboard

outdated

The package that writes the logs to the database and sends these logs to the SEQ LOG Api service.

seq_logger #

Seq compatible logger package for Flutter.
more info for seq: https://datalust.co/seq

With Flutter:

 $ flutter pub add seq_logger

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

dependencies:
  seq_logger: ^1.0.3

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

Import it Now in your Dart code, you can use:

import 'package:seq_logger/seq_logger.dart';

How to Use #

Init Package in your main function.

void main() {
  if (!SeqLogger.initialized) {
    SeqLogger.init(url: "YOUR_API_ENDPOINT_URL_HERE", apiKey: "YOUR_API_KEY");
  }

  runApp(const MyApp());
}

Add your logs whenever required. You can use template in your message string and provide values in data field. Your logs will be collected on device.

SeqLogger.addLogToDb(
   message: "Your log message here with {Awesome} template",
   level: LogLevel.debug,
   data: {
     "Awesome": "the value that will highlighted in your template",
     "yourKey": "Your value",
     "yourOtherKey": false,
   },
 );

Trigger sending collected logs. Process will send collected logs based on your batchsize parameter.

SeqLogger.sendLogs();

Gives the number of logs stored in the database.

int count = await SeqLogger.getRecordCount();

score

3
likes
0
points
12
downloads

Publisher

verified publisherperformans.com

Weekly Downloads

The package that writes the logs to the database and sends these logs to the SEQ LOG Api service.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

dio, flutter, intl, path, path_provider, sqflite

More

Packages that depend on seq_logger