main: removed debug prints

Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
This commit is contained in:
Frank Villaro-Dixon 2024-05-24 23:54:43 +02:00
parent dcce9113d1
commit 816480d091

View file

@ -43,7 +43,6 @@ async fn put_post(
qs: web::Query<QSParams>, qs: web::Query<QSParams>,
body: web::Json<OtsdbData>, body: web::Json<OtsdbData>,
) -> impl Responder { ) -> impl Responder {
println!("Body: {:?}", body);
let authenticated_client = config::try_authenticate_client(&shared.cfg.clients, &qs.token); let authenticated_client = config::try_authenticate_client(&shared.cfg.clients, &qs.token);
if authenticated_client.is_none() { if authenticated_client.is_none() {
@ -59,13 +58,10 @@ async fn put_post(
client.metrics.join(", ") client.metrics.join(", ")
)); ));
} }
println!("Client: {:?}", client);
let post_url = format!("{}put", shared.cfg.config.opentsdb.url); let post_url = format!("{}put", shared.cfg.config.opentsdb.url);
let otsdb_body = serde_json::to_string(&body).unwrap(); let otsdb_body = serde_json::to_string(&body).unwrap();
println!("POST URL: {}", post_url);
let response = shared let response = shared
.web_client .web_client
.post(post_url) .post(post_url)
@ -91,7 +87,7 @@ async fn main() -> std::io::Result<()> {
let cfg_file = env::var("CONFIG_FILE").unwrap_or(CONFIG_FILE.to_string()); let cfg_file = env::var("CONFIG_FILE").unwrap_or(CONFIG_FILE.to_string());
let cfg = config::load_config_file(&cfg_file); let cfg = config::load_config_file(&cfg_file);
println!("Config: {:?}", cfg); println!("Loaded config: {:#?}", cfg);
let server_port = cfg.config.server.port.clone(); let server_port = cfg.config.server.port.clone();
let web_client = Client::new(); let web_client = Client::new();