Skip to content

Replace unmaintained ansi_term crate with nu_ansi_term crate. #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ readme = "README.md"
[dependencies]
tracing-core = "0.1"
tracing-subscriber = { version = "0.3", default-features = false, features = ["registry", "fmt", "std"] }
ansi_term = "0.12"
nu-ansi-term = "0.46.0"
atty = "0.2"
tracing-log = { version = "0.1", optional = true }

Expand Down
4 changes: 2 additions & 2 deletions src/format.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use ansi_term::Color;
use nu_ansi_term::Color;
use std::{
fmt::{self, Write as _},
io,
Expand Down Expand Up @@ -251,7 +251,7 @@ impl<'a> fmt::Display for ColorLevel<'a> {
Level::TRACE => Color::Purple.bold().paint("TRACE"),
Level::DEBUG => Color::Blue.bold().paint("DEBUG"),
Level::INFO => Color::Green.bold().paint(" INFO"),
Level::WARN => Color::RGB(252, 234, 160).bold().paint(" WARN"), // orange
Level::WARN => Color::Rgb(252, 234, 160).bold().paint(" WARN"), // orange
Level::ERROR => Color::Red.bold().paint("ERROR"),
}
.fmt(f)
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pub(crate) mod format;

use ansi_term::{Color, Style};
use format::{Buffers, ColorLevel, Config, FmtEvent, SpanMode};
use nu_ansi_term::{Color, Style};
use std::{
fmt::{self, Write as _},
io,
Expand Down