From 4fbd373e29bea22df77750362a983ea507076a4e Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Wed, 17 Apr 2024 21:25:25 +0800 Subject: [PATCH] chore: update logging --- crates/gpapi/src/portal/prelogin.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/gpapi/src/portal/prelogin.rs b/crates/gpapi/src/portal/prelogin.rs index fc13fdb..5bef538 100644 --- a/crates/gpapi/src/portal/prelogin.rs +++ b/crates/gpapi/src/portal/prelogin.rs @@ -98,10 +98,12 @@ impl Prelogin { pub async fn prelogin(portal: &str, gp_params: &GpParams) -> anyhow::Result { let user_agent = gp_params.user_agent(); - info!("Prelogin with user_agent: {}", user_agent); + let is_gateway = gp_params.is_gateway(); + let prelogin_type = if is_gateway { "Gateway" } else { "Portal" }; + + info!("{} prelogin with user_agent: {}", prelogin_type, user_agent); let portal = normalize_server(portal)?; - let is_gateway = gp_params.is_gateway(); let path = if is_gateway { "ssl-vpn" } else { "global-protect" }; let prelogin_url = format!("{portal}/{}/prelogin.esp", path); let mut params = gp_params.to_params(); @@ -112,8 +114,6 @@ pub async fn prelogin(portal: &str, gp_params: &GpParams) -> anyhow::Result