Skip to content

Commit

Permalink
fix log level
Browse files Browse the repository at this point in the history
  • Loading branch information
bck01215 committed Jul 18, 2024
1 parent a63f9d4 commit 4d51ff7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/elasticnow/elasticnow.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use reqwest::Client;
use tracing::{debug, Instrument};

use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -84,7 +83,7 @@ impl ElasticNow {
path: &str,
body: serde_json::Value,
) -> Result<reqwest::Response, reqwest::Error> {
debug!("Getting {}", path);
tracing::debug!("Getting {}", path);
self.client
.post(self.instance.to_owned() + path)
.json(&body)
Expand Down
8 changes: 4 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async fn run_timetrack(
"https://{}.service-now.com/task.do?sys_id={}",
&config.sn_instance, sys_id
));
tracing::info!("Link to ticket: {}", ticket_url);
println!("Link to ticket: {}", ticket_url);
}
std::process::exit(0);
}
Expand Down Expand Up @@ -308,7 +308,7 @@ async fn run_stdchg(search: String, bin: Option<String>, template_id: Option<Str
"https://{}.service-now.com/change_request.do?sys_id={}",
&config.sn_instance, sys_id
));
tracing::info!("Link to CHG: {}", ticket_url);
println!("Link to CHG: {}", ticket_url);

std::process::exit(0);
}
Expand Down Expand Up @@ -402,11 +402,11 @@ fn get_cookie_from_browser(elasticnow_url: &str) -> String {
Ok(listener) => {
server = Some(Server::from_listener(listener, None).unwrap());
chosen_port = port;
println!("Server running on port {}", port);
tracing::info!("Server running on port {}", port);
break;
}
Err(_) => {
println!("Port {} is in use, trying next port...", port);
tracing::info!("Port {} is in use, trying next port...", port);
}
}
}
Expand Down

0 comments on commit 4d51ff7

Please sign in to comment.