LogHive Mobile Push Notification of your events

Get push notifications from Dart

As a developer, you know how important it is to catch errors and track events in your application. However, constantly monitoring logs and dashboards can be time-consuming and tedious.

When working on my own projects, I used to log error messages and events to files or send them to myself via email. However, constantly checking log files and managing my inbox became a hassle. That’s why I created LogHive, an event service that allows you to receive push notifications directly to your mobile device whenever an event is triggered.

In this article, I will describe how you can easily integrate LogHive into your Dart project.

How it works in Dart

LogHive provides a simple REST API that you can use to push events and errors to the LogHive service. You can organize your events into projects and groups to keep them organized and easily searchable. Once an event is pushed to LogHive, it is processed and can be viewed in the event stream or dashboard.

With just a few lines of Dart-code, you can start pushing events to LogHive and receiving push notifications for your application’s events and errors.

import 'dart:convert';
import 'package:http/http.dart' as http;

Future<void> sendRequest() async {
  final url = Uri.parse('https://api.loghive.app/v1/event/add');
  final headers = <String, String>{
    'Content-Type': 'application/json',
    'Authorization': 'ApiKey: your-api-key'
  final data = {
  'project': 'yourprojectname', 
  'group': 'yourgroupname', 
  'event': 'your-event-name', 
  'description': 'your-description', 
  'notify': false};    

  final response = await http.post(url, headers: headers, body: json.encode(data));
  // Handle response

If an error occurs while creating an event, you will receive an Error object in return.

{'StatusCode': 400, 'Message': 'missing group name'}

You can receive your API-Key here: API-Key.

Receive Push Notifications

To receive push notifications, you simply need to install the LogHive Android app (Playstore) or use LogHive through the web application and allow notifications.

Add an element to your project dashboard

In addition to push notifications, LogHive allows you to display captured events in a dashboard with various elements. With just a few clicks, you can display the events already pushed in the dashboard.

In conclusion, logging and tracking events is essential for maintaining a healthy and performant application. However, it doesn’t have to be a tedious and overwhelm

Latest Posts