Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add logs #614

Merged
merged 3 commits into from
Feb 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
Rachelint marked this conversation as resolved.
Show resolved Hide resolved
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()
);
ShiKaiWi marked this conversation as resolved.
Show resolved Hide resolved

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);
ShiKaiWi marked this conversation as resolved.
Show resolved Hide resolved
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