From c6e2abfac80223cd31412f31cbfa08a0d06931c7 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Thu, 23 Dec 2021 15:45:02 +0800 Subject: [PATCH] chore: log [cli] with tracing-subscriber --- sea-orm-cli/Cargo.toml | 4 ++-- sea-orm-cli/src/main.rs | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sea-orm-cli/Cargo.toml b/sea-orm-cli/Cargo.toml index 0c8a06605..6dca13bb3 100644 --- a/sea-orm-cli/Cargo.toml +++ b/sea-orm-cli/Cargo.toml @@ -30,8 +30,8 @@ sea-schema = { version = "0.3.0", default-features = false, features = [ "writer", ] } sqlx = { version = "^0.5", default-features = false, features = [ "mysql", "postgres" ] } -env_logger = { version = "^0.9" } -log = { version = "^0.4" } +tracing-subscriber = { version = "0.3", features = ["env-filter"] } +tracing = { version = "0.1" } url = "^2.2" [dev-dependencies] diff --git a/sea-orm-cli/src/main.rs b/sea-orm-cli/src/main.rs index 2c7848ce9..aee80b0b6 100644 --- a/sea-orm-cli/src/main.rs +++ b/sea-orm-cli/src/main.rs @@ -1,6 +1,5 @@ use clap::ArgMatches; use dotenv::dotenv; -use log::LevelFilter; use sea_orm_codegen::{EntityTransformer, OutputFile, WithSerde}; use std::{error::Error, fmt::Display, fs, io::Write, path::Path, process::Command, str::FromStr}; use url::Url; @@ -33,9 +32,9 @@ async fn run_generate_command(matches: &ArgMatches<'_>) -> Result<(), Box