seq_logger

Last updated:

0 purchases

seq_logger Image
seq_logger Images
Add to Cart

Description:

seq logger

seq_logger #
Seq compatible logger package for Flutter.
more info for seq: https://datalust.co/seq
With Flutter:
$ flutter pub add seq_logger
copied to clipboard
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.8
copied to clipboard
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';
copied to clipboard
How to Use #
see working example here

Init Package in your main function anywhere before runApp.
void main() {

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

runApp(const MyApp());
}
copied to clipboard
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,
},
);
copied to clipboard
Trigger sending collected logs.
Process will send collected logs based on your batchsize parameter.
SeqLogger.sendLogs();
copied to clipboard
Gives the number of logs stored in the database.
int count = await SeqLogger.getRecordCount();

copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.