Skip to content

Shek863/logs_spotter

Repository files navigation

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.0-dev.1

Usage

Call this to configure spotter engine

     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 📥


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published