-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for custom styles and owo_colors (#11)
* init * Add missing test data * Implement requested changes * Rename test/styles.rs and tests/data/style_control.txt * bump version on owo-colors and run rustfmt * update control to include source lines * tweek the documentation a little * bump version and prep for release * (cargo-release) start next development iteration 0.1.6-alpha.0 Co-authored-by: d4h0 <[email protected]> Co-authored-by: Jane Lusby <[email protected]>
- Loading branch information
1 parent
0769344
commit a1335a7
Showing
5 changed files
with
286 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Changelog | ||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
<!-- next-header --> | ||
|
||
## [Unreleased] - ReleaseDate | ||
### Added | ||
- Support custom color themes for spantrace format | ||
|
||
<!-- next-url --> | ||
[Unreleased]: https://github.com/yaahc/color-spantrace/releases/tag/v0.1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "color-spantrace" | ||
version = "0.1.4" | ||
version = "0.1.6-alpha.0" | ||
authors = ["Jane Lusby <[email protected]>"] | ||
edition = "2018" | ||
license = "MIT OR Apache-2.0" | ||
|
@@ -14,8 +14,48 @@ readme = "README.md" | |
[dependencies] | ||
tracing-error = "0.1.2" | ||
tracing-core = "0.1.10" | ||
ansi_term = "0.11" | ||
owo-colors = "1.2.0" | ||
once_cell = "1.4.1" | ||
|
||
[dev-dependencies] | ||
tracing-subscriber = "0.2.5" | ||
tracing = "0.1.13" | ||
ansi-parser = "0.6.5" # used for testing color schemes | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file = "CHANGELOG.md" | ||
search = "Unreleased" | ||
replace="{{version}}" | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file = "src/lib.rs" | ||
search = "#!\\[doc\\(html_root_url.*" | ||
replace = "#![doc(html_root_url = \"https://docs.rs/{{crate_name}}/{{version}}\")]" | ||
exactly = 1 | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file = "CHANGELOG.md" | ||
search = "\\.\\.\\.HEAD" | ||
replace="...{{tag_name}}" | ||
exactly = 1 | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file = "CHANGELOG.md" | ||
search = "ReleaseDate" | ||
replace="{{date}}" | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file="CHANGELOG.md" | ||
search="<!-- next-header -->" | ||
replace="<!-- next-header -->\n\n## [Unreleased] - ReleaseDate" | ||
exactly=1 | ||
|
||
[[package.metadata.release.pre-release-replacements]] | ||
file="CHANGELOG.md" | ||
search="<!-- next-url -->" | ||
replace="<!-- next-url -->\n[Unreleased]: https://github.com/yaahc/{{crate_name}}/compare/{{tag_name}}...HEAD" | ||
exactly=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
||
0: [91mthemes[0m[91m::[0m[91mtest_capture[0m with [96mx=42[0m | ||
at [35mtests/themes.rs[0m:[35m42[0m | ||
40 │ use tracing_subscriber::{prelude::*, registry::Registry}; | ||
41 │ | ||
[37m[1m 42 > #[instrument][0m | ||
43 │ fn test_capture(x: u8) -> SpanTrace { | ||
44 │ if x == 42 { |
Oops, something went wrong.