jetlog 1.0.0-rc.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 64

jetlog ยท Test Status Code Coveraege

Fast, structured, leveled logging for Dart.

jetlog's API is designed to provide great development experience without losing performance. jetlog allows to format logging records into different representations and supports formatting to JSON and text out of the box.

There are a couple of features developer may benefit from:

  • Blazing fast logging
  • Efficient logging of structured data (with support to lazy evaluation)
  • Unambiguous support for loggers hierarchy
  • Exchangeable logging handlers
  • Logging filters

Installation #

To get mostly up to date package install it through pub.

pub get jetlog

Getting started #

The easiest way to get up and running is to use global logger provided in global_logger package library.

import 'package:jetlog/global_logger.dart' as logger;
import 'package:jetlog/jetlog.dart' as log show Str;

void main() async {
  logger.bind({
    const log.Str('hello', 'world')
  }).info('Greeting');
}

// => '2019-06-27 15:37:38.046859 [INFO]: Greeting hello=world'

License #

Released under the MIT license.

CHANGELOG.md #

1.0.0-rc.0 #

  • Introduce Any field, a special field kind of which is determined based on value's type probation.
  • Introduce lazy fields, i.e. fields values of which are evaluated on access.
  • Formatter now is typedef rather than abstract class.
  • Filter now is typedef rather than abstract class. It allows plain functions to be used as filters as well as callable classes.

v0.6.0 #

  • StreamHandler throws on null stream as well as null formatter.

example/README.md

This directory contains project examples #

  • complex_example.dart provides an example how to redirect records with debug/info severity levels to stdout but records with warning/error/fatal severity levels to stderr

  • console_example.dart provides an example how to print records to the console

Use this package as a library

1. Depend on it

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


dependencies:
  jetlog: ^1.0.0-rc.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or 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:jetlog/jetlog.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
30
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95
Overall:
Weighted score of the above. [more]
64
Learn more about scoring.

We analyzed this package on Nov 4, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:jetlog/jetlog.dart.

Health suggestions

Format lib/src/logger_impl.dart.

Run dartfmt to format lib/src/logger_impl.dart.

Maintenance suggestions

Package is pre-release. (-5 points)

Pre-release versions should be used with caution; their API can change in breaking ways.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.3.0 <3.0.0
meta ^1.1.7 1.1.8
Dev dependencies
analyzer ^0.36.4
test ^1.6.4