lucasrafagnin / logsnag

LogSnag Dart Package

Home Page:https://pub.dev/packages/logsnag

Repository from Github https://github.comlucasrafagnin/logsnagRepository from Github https://github.comlucasrafagnin/logsnag

LogSnag

LogSnag

License: MIT

Installation πŸ’»

❗ In order to start using Logsnag you must have the Dart SDK installed on your machine.

Add logsnag to your pubspec.yaml:

dependencies:
  logsnag: {version}

Install it:

dart pub get

Usage πŸš€

Initialization

To initialize Logsnag, import the logsnag package and create a new instance of Logsnag:

import 'package:logsnag/logsnag.dart';

void main() {
  final logSnag = LogSnag(
    project: {project},
    token: {token},
  );
}

Logging

To send a log, use the log method:

logSnag.log(
  channel: 'test-channel',
  event: 'User Joined',
  description: 'Email: john@example.com',
  icon: 'πŸ‘‹',
  tags: {
    'name': 'john doe',
    'email': 'john@example.com',
  },
  notify: true,
);

Insight

To send an insight, use the insight method:

logSnag.insight(
  title: 'Test',
  value: 'Test',
  icon: 'πŸ‘‹',
);

About

LogSnag Dart Package

https://pub.dev/packages/logsnag

License:MIT License


Languages

Language:Dart 100.0%