Serialize stack traces from the stack_trace
package.
Disclaimer: This is not an official Google or Dart project.
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.
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)));
}
We welcome a diverse set of contributions, including, but not limited to:
- Filing bugs and feature requests
- Send a pull request
- Or, create something awesome using this API and share with us and others!
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.
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