mirror of https://github.com/rwf2/Rocket.git
Enable ASCII escape sequences in Windows consoles.
This commit is contained in:
parent
3abc813605
commit
b276e1d51f
|
@ -18,7 +18,7 @@ categories = ["web-programming::http-server"]
|
|||
tls = ["rustls", "hyper-sync-rustls"]
|
||||
|
||||
[dependencies]
|
||||
yansi = { version = "0.3", features = ["nightly"] }
|
||||
yansi = { version = "0.3.1", features = ["nightly"] }
|
||||
log = "0.3"
|
||||
url = "1"
|
||||
toml = "0.4.2"
|
||||
|
|
|
@ -143,6 +143,8 @@ impl Log for RocketLogger {
|
|||
pub fn try_init(level: LoggingLevel, verbose: bool) {
|
||||
if !::isatty::stdout_isatty() {
|
||||
Paint::disable();
|
||||
} else if cfg!(windows) {
|
||||
Paint::enable_windows_ascii();
|
||||
}
|
||||
|
||||
let result = log::set_logger(|max_log_level| {
|
||||
|
|
Loading…
Reference in New Issue