logsnag 0.2.0+2 copy "logsnag: ^0.2.0+2" to clipboard
logsnag: ^0.2.0+2 copied to clipboard

A Dart and Flutter package for sending logs and insights to 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: '👋',
);
1
likes
150
points
0
downloads

Publisher

verified publisherjorandob.nl

Weekly Downloads

A Dart and Flutter package for sending logs and insights to LogSnag.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

http

More

Packages that depend on logsnag