Skip to content

Commit 7e25434

Browse files
committed
feat: init logger for ttc server.
1 parent 2ff54dd commit 7e25434

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

core/src/client.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ const HEADER_QUERY_CONTEXT: &str = "X-DATABEND-QUERY-CONTEXT";
6969
const HEADER_SESSION_ID: &str = "X-DATABEND-SESSION-ID";
7070
const CONTENT_TYPE_ARROW: &str = "application/vnd.apache.arrow.stream";
7171
const CONTENT_TYPE_ARROW_OR_JSON: &str = "application/vnd.apache.arrow.stream";
72-
//const CONTENT_TYPE_ARROW_OR_JSON: &str = "application/vnd.apache.arrow.stream,application/json";
7372

7473
static VERSION: Lazy<String> = Lazy::new(|| {
7574
let version = option_env!("CARGO_PKG_VERSION").unwrap_or("unknown");

ttc/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ databend-driver = { workspace = true }
1515

1616
bytes = "1"
1717
clap = { version = "4.4", features = ["derive", "env"] }
18+
env_logger = "0.11.8"
1819
serde = { version = "1.0", features = ["derive"] }
1920
serde_json = { version = "1.0", default-features = false, features = ["std"] }
2021
tokio = { version = "1.34", features = [

ttc/src/server.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ struct Response {
4242

4343
#[tokio::main]
4444
async fn main() -> Result<(), Box<dyn std::error::Error>> {
45+
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("warn"))
46+
.target(env_logger::Target::Stdout)
47+
.init();
48+
4549
let config = Config::parse();
4650

4751
// check dsn

0 commit comments

Comments
 (0)