Skip to content

Commit

Permalink
chore: add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Feb 6, 2023
1 parent fe32f85 commit f855c39
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion components/message_queue/src/kafka/kafka_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ impl MessageQueue for KafkaImpl {

// Create topic in Kafka.
let topic_management_config = &self.config.topic_management_config;
info!("Try to create topic:{} in kafka", topic_name);
info!("Try to create topic, name:{}.", topic_name);
let result = self
.controller_client
.create_topic(
Expand All @@ -211,6 +211,7 @@ impl MessageQueue for KafkaImpl {
)
.await;

info!("Create topic finish, name:{}", topic_name);
match result {
// Race condition between check and creation action, that's OK.
Ok(_)
Expand Down
7 changes: 6 additions & 1 deletion server/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
time::Duration,
};

use log::error;
use log::{error, info};
use logger::RuntimeLevel;
use profile::Profiler;
use prom_remote_api::{types::RemoteStorageRef, web};
Expand Down Expand Up @@ -459,6 +459,11 @@ impl<Q: QueryExecutor + 'static> Builder<Q> {
enable_tenant_as_schema: self.enable_tenant_as_schema,
};

info!(
"HTTP server starts listening on {}",
&self.config.endpoint.to_string()
);

let ip_addr: IpAddr = self.config.endpoint.addr.parse().context(ParseIpAddr {
ip: self.config.endpoint.addr,
})?;
Expand Down
2 changes: 1 addition & 1 deletion server/src/mysql/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ impl<Q: QueryExecutor + 'static> MysqlService<Q> {

let rt = self.runtimes.clone();
self.tx = Some(tx);
info!("MySQL server starts listening on {}", self.socket_addr);
self.join_handler = Some(rt.bg_runtime.spawn(Self::loop_accept(
self.instance.clone(),
self.runtimes.clone(),
self.socket_addr,
self.timeout,
rx,
)));
info!("Mysql service listens on {}", self.socket_addr);
Ok(())
}

Expand Down

0 comments on commit f855c39

Please sign in to comment.