LogSnag class
LogSnag is a Dart library for sending logs to LogSnag https://logsnag.com https://docs.logsnag.com/api
Example:
import 'package:logsnag/logsnag.dart';
void main() async {
final logSnag = LogSnag(
project: 'project',
token: 'token',
);
await logSnag.publish(
channel: 'channel',
event: 'event',
description: 'description',
icon: 'icon',
tags: {
'tag': 'tag',
},
notify: true,
);
await logSnag.insight(
title: 'title',
value: 'value',
icon: 'icon',
);
See also:
- LogSnag
LogSnag.publish
- LogSnag.insight
Constructors
- LogSnag.new({required String project, required String token, Client? httpClient})
- Create a new LogSnag instance
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
insight(
{required String title, required String value, required String icon}) → Future< void> - Call the LogSnag API to publish an insight https://docs.logsnag.com/endpoints/insight
-
log(
{required String channel, required String event, String? description, String? icon, Map< String, dynamic> ? tags, bool? notify}) → Future<void> - Call the LogSnag API to publish a log https://docs.logsnag.com/endpoints/log
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited