humio 0.0.6

  • Readme
  • Changelog
  • Example
  • Installing
  • 58

humio #

Analytics and error logging from your Flutter app to Humio.

Getting Started #

To use this plugin, add humio as a dependency in your pubspec.yaml file.

When humio is added to your project you can initialize it using your Humio ingest token:

var humio = Humio.defaultImplementation('your-humio-ingest-token');

You are now ready to log to Humio:

await humio.information('Logging using the information level');

Example #

A longer example:

var humio = Humio.defaultImplementation('your-humio-ingest-token');

await humio.information('The example app uses extension methods to avoid magic strings for the level');

await humio.verbose('There are extension methods available for the most common log levels');

try {
  throw 'Something bad happened';
} catch (error, stackTrace) {
  await humio.error(
      'Errors can easily be logged with the error message and the corresponding stack trace',

for more examples look in example/humio_basic_example.dart.

Enrichers #

If you have certain fields you always want to send to Humio, you should consider using Enrichers.

Enrichers can be added dynamically and when they have been added they will annotate every log statement with the fields they provide.

View the example in example/humio_with_enrichers.dart for a simple example.

[0.0.6] - 2020-05-02 #

  • Dispatcher consent introduced. Makes the acutal HTTP request to send data to Humio.
  • Bugs fixed:
    • Level set correctly when tags are provided.

[0.0.5] - TagEnrichers added #

[0.0.4] - Enrichers added #

[0.0.3] - Additional info added to #

[0.0.2] - Extension methods made async #

  • Serverity property renamed to level.
  • Default tag changed to level.
  • Example provided.

[0.0.1] - Initial commit of working code #

  • Working code which can log to Humio given a valid ingest token.


import 'humio_basic_example.dart';
import 'humio_with_enrichers.dart';

Future main() async {
  await HumioBasicExample().run();
  await HumioEnricherExample().run();

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  humio: ^0.0.6

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:humio/humio.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

because of import path [humio] that is in a package requiring null.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
dio ^3.0.9 3.0.9
flutter 0.0.0
Transitive dependencies
charcode 1.1.3
collection 1.14.12 1.14.13
http_parser 3.1.4
meta 1.1.8
path 1.7.0
sky_engine 0.0.99
source_span 1.7.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6 1.2.0
vector_math 2.0.8
Dev dependencies