insightops_dart 0.0.2 copy "insightops_dart: ^0.0.2" to clipboard
insightops_dart: ^0.0.2 copied to clipboard

outdated

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

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);
  }
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1
likes
0
pub points
6%
popularity

Publisher

verified publisherookamikb.dev

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async, http, logging

More

Packages that depend on insightops_dart