mirror of
https://github.com/AleoHQ/leo.git
synced 2024-12-11 10:22:33 +03:00
adds colors to Windows CLI
This commit is contained in:
parent
fc3c45e056
commit
2a9ed0b432
@ -202,6 +202,10 @@ where
|
||||
|
||||
/// Initialize logger with custom format and verbosity.
|
||||
pub fn init_logger(_app_name: &'static str, verbosity: usize) {
|
||||
// This line enables Windows 10 ANSI coloring API.
|
||||
#[cfg(target_family = "windows")]
|
||||
ansi_term::enable_ansi_support();
|
||||
|
||||
let subscriber = FmtSubscriber::builder()
|
||||
// all spans/events with a level higher than TRACE (e.g, debug, info, warn, etc.)
|
||||
// will be written to stdout.
|
||||
|
@ -178,9 +178,6 @@ enum CommandOpts {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
#[cfg(target_family = "windows")]
|
||||
ansi_term::enable_ansi_support();
|
||||
|
||||
// Read command line arguments.
|
||||
let opt = Opt::from_args();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user