Unofficial wrapper for using Rapid7 insightOps logs (former LogEntries) with Dart.

Overview

An unofficial wrapper for using Rapid7 insightOps logs (former LogEntries) with Dart.

This package is using logging package to do the actual logging, and implements a handler to post the message to insightOps.

Setting up

Set up a new log by following the instructions, copy a URL that you will use to send your log data to.

Usage

A simple usage example:

import 'package:insightops_dart/insightops_dart.dart';
import 'package:logging/logging.dart';

main() {
  // Create handler and pass the URL from log settings.
  final handler = InsightOpsLogger('__LOG_URL__');

  // Define settings for the logger.
  Logger.root.level = Level.ALL;
  Logger.root.onRecord.listen(handler);

  // Create logger.
  final logger = Logger('Test logger');

  // Log info message.
  logger.info('test message');

  // Log errors with stacktrace.
  try {
    throw Error();
  } catch (e, stackTrace) {
    logger.severe('Test failure', e, stackTrace);
  }
}

Update body of the message

You can optionally pass transformBody parameter to the constructor. This method will be called with each request with the body of the message. You can use it to update the body:

final handler = InsightOpsLogger(
  '__LOG_URL__',
  transformBody: (body) async =>
  {
    'meta': {'deviceId': 'ID'},
    ...body,
  },
);

Features and bugs

Please file feature requests and bugs at the issue tracker.

You might also like...

unofficial windows client for smotreshka.tv

smotreshka Rebuild models flutter pub run build_runner build --delete-conflicting-outputs Getting Started This project is a starting point for a Flut

Dec 3, 2021

Unofficial delivery app for Rapidinho made with Flutter

Unofficial delivery app for Rapidinho made with Flutter

Rapidinho Unofficial delivery app for Rapidinho made with Flutter Getting Started Gradle version: 4.6 Flutter version: 0.8.3 Install Flutter Clone thi

Dec 26, 2022

Unofficial 🐘 client written in 🎯

mastodon_dart The official Dart library for accessing the Mastodon API. Optionally use in conjunction with mastodon_flutter to build a Flutter Mastodo

Dec 22, 2022

Unofficial Turkish Dictionary app of TDK (Turkish Language Association) developing with Flutter

Unofficial Turkish Dictionary app of TDK (Turkish Language Association) developing with Flutter

Turkish Dictionary Unofficial Turkish Dictionary app of TDK (Turkish Language Association) developing with Flutter Design Feyza Nur Demirci Şahin Abut

Oct 20, 2022

An open-source unofficial GitHub mobile client, that aims to deliver the ultimate GitHub experience on mobile devices.

An open-source unofficial GitHub mobile client, that aims to deliver the ultimate GitHub experience on mobile devices.

DioHub for Github Summary Features Roadmap Support Screenshots Build Instructions Summary DioHub is an open-source unofficial GitHub mobile client, th

Jan 4, 2023

An unofficial Flutter plugin that wraps pusher-websocket-java on Android and pusher-websocket-swift on iOS

Pusher Flutter Client An unofficial Flutter plugin that wraps pusher-websocket-java on Android and pusher-websocket-swift on iOS. Get it from pub. How

Oct 21, 2022

Unofficial KronoX app for Android and iOS

Unofficial KronoX app for Android and iOS

School Schedule Unofficial KronoX app for Android and iOS made using Flutter Supported Platforms The app is available on Google Play. It's not availab

Oct 31, 2022

VerificaC19-flutter - Unofficial EU DGC validation package for Flutter

VerificaC19 package for Flutter About This package allows to decode and validate

Oct 21, 2022

Flutter list view - An unofficial list view for flutter

Flutter list view - An unofficial list view for flutter

Flutter List View I don't like official list view. There are some features don't

Dec 15, 2022
Comments
  • Merge meta dictionary to root of body

    Merge meta dictionary to root of body

    Merging the meta dictionary on top-level of the body dictionary allows for more structural freedom of the constructed logs. That makes it easier to be consistent with existing projects that log to InsightOps and re-use saved queries across multiple log sets / projects.

    In case of conflicts, the proposed implementation gives precendence to the body's values.

    opened by dgimb89 3
Owner
Kirill Bubochkin
Mobile/Web developer. Head of Applications at Mews.
Kirill Bubochkin
An unofficial wrapper for the kdecole api

This is an UNOFFICIAL wrapper for the kdecole api How to use ? Login First, you need to create a Client() object : LOGIN AND PASSWORD ARE NOT YOUR ENT

null 5 Nov 2, 2022
Federico 1 Feb 3, 2022
A flutter package that developers have pretty logs instead just printing everything like a newbie

A flutter package that developers have pretty logs instead just printing everything like a newbie. Features Makes it easy to log to console without us

null 2 Nov 28, 2021
Small, easy to use and extensible logger which prints beautiful logs.

Logger Small, easy to use and extensible logger which prints beautiful logs. Inspired by logger for Android. Show some ❤️ and star the repo to support

Simon Leier 1k Jan 5, 2023
Do you need logs? Lumberdash is the answer!

lumberdash Do you need logs? Lumberdash is the answer! With a simple but powerful logging API, Lumberdash is the easiest way to record logs. And if th

BMW Tech 160 Dec 12, 2022
Flutter & Dart Unofficial Flat Data API

Flutter & Dart Unofficial Flat Data API Flat Dataset for different helpful Flutter APIs Flutter Releases Currently does a daily snapshot of the Flutte

Leo Farias 21 Dec 26, 2022
A most easily usable Duolingo API wrapper in Dart. Duolingo4D is an open-sourced Dart library.

A most easily usable Duolingo API wrapper in Dart! 1. About Duolingo4D Duolingo4D is an open-sourced Dart library. With Duolingo4D, you can easily int

Kato Shinya 18 Oct 17, 2022
Dart wrapper via `dart:js` for webusb

Dart wrapper via dart:js for https://wicg.github.io/webusb/ Features canUseUsb g

Woodemi Co., Ltd 1 Jan 25, 2022
A wrapper around our Cocoa and Java client library SDKs, providing iOS and Android support for those using Flutter and Dart.

Ably Flutter Plugin A Flutter plugin wrapping the ably-cocoa (iOS) and ably-java (Android) client library SDKs for Ably, the platform that powers sync

Ably Realtime - our client library SDKs and libraries 46 Dec 13, 2022
The unofficial flutter plugin for Freshchat

?? Flutter Freshchat A Flutter plugin for integrating Freshchat in your mobile app. Setup Android Add this to your AndroidManifest.xml <provider a

Fayeed Pawaskar 31 Jun 2, 2022