Serialize Stack Traces (Dart)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
AUTHORS
CHANGELOG.md
LICENSE
README.md
analysis_options.yaml
pubspec.yaml

README.md

stack_trace_codec

Build Status Pub Package Version Latest Dartdocs

Serialize stack traces from the stack_trace package.

Disclaimer: This is not an official Google or Dart project.

Installation

Add stack_trace_codec in your [pubspec.yaml][pubspec] file:

dependencies:
  stack_trace_codec: ^0.1.0

And that's it! See usage for details.

Usage

Currently, a single codec, JsonTraceCodec, is available:

import 'dart:convert';

import 'package:stack_trace/stack_trace.dart';
import 'package:stack_trace_codec/stack_trace_codec.dart';

void logJson(String json) { /* ... */ }

// See package:stack_trace for details on converting from StackTrace --> Trace.
void logStackTrace(Trace trace) {
  logJson(JSON.encode(const JsonTraceCodec().encode(trace)));
}

Contributing

We welcome a diverse set of contributions, including, but not limited to:

For the stability of the API and existing users, consider opening an issue first before implementing a large new feature or breaking an API. For smaller changes (like documentation, minor bug fixes), just send a pull request.

Testing

All pull requests are validated against travis, and must pass.

Ensure code passes all our analyzer checks:

$ dartanalyzer .

Ensure all code is formatted with the latest dev-channel SDK.

$ dartfmt -w .

Run all of our unit tests:

$ pub run test