logs_spotter 0.1.3

SDKflutter
Platformandroidioswindowsmacos

Spotter is a open source log engine plugin for Flutter. There allow developer to see what happen whenever or remotely debug their application

logs_spotter

Spotter is a open source log engine plugin for Flutter. There allow developer to see what happen whenever or remotely debug their application

version popularity all contributors

Setup

Add the following to your "pubspec.yaml" file:

  logs_spotter: ^0.1.2

Usage

You need to encapscul you main code with spotterScope() like this This will automatically catch FlutterError

      await spotterScope(() async {
        runApp(const MyApp());
      });

You can also specify spotter engine configuration Please see a github example

     await Spotter().initializeEngine(
fileName: "my_app_logs",
writeToFile: true,
writeToConsole: true,
writeToFirebase: true,
customId: "spotter_example_emulator_1024020",
remoteObserveDefaultValue: false,
exportLocal: true );

initializeEngine() Params descriptions

ArgumentTypeRequiredDetails
customIdString?Nocustom app, device or user identifier Ex : 518739839
fileNameStringNoLocal file name
writeToConsoleboolNoShow log on console Ex : true
writeToFileboolNoEnable in file writing Ex : true
writeToFirebaseboolNoEnable remote writing (Firebase) Ex : true
exportLocalboolNoExport local logs on remote observe (Firebase) Ex : true
remoteObserveDefaultValueboolNoset remote writing [Firebase] defaultValue Ex : false

To log messages

//To log an message
// Log level method : Level.WARNING
"warningMessage".w.spot();
// Log level method : Level.ERROR
"errorMessage".e.spot();

//add TAG
// Log level method : Level.CLICK
"incrementCounter: $_counter".c.spot(tag: click);
// Log level method : Level.FINE
"goodJob".f.spot(tag: tag);
// Log level method : Level.INFO
"yourMessage".i.spot(tag: tag);

By default this method write log on console

[!NOTE]
The defaut values for tag property are: click 🖱️, error 🚨, warning 🚧, debug 🐞, request 📤, response 📥