diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-10-27 17:51:07 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-10-27 17:51:07 +0800 |
| commit | b772e12c22b87e1473d1002ef9b82d954d2239a7 (patch) | |
| tree | ff83de3ecb921ba598ef11e22ae776941a90f777 /crates/vcs_actions | |
| parent | 60219b20754dda7f560deb5e9e442d46e4636507 (diff) | |
update: Add connection logs to show active count
Include current connection count in connection open/close log messages
for better monitoring of server load
Diffstat (limited to 'crates/vcs_actions')
| -rw-r--r-- | crates/vcs_actions/src/connection/action_service.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/vcs_actions/src/connection/action_service.rs b/crates/vcs_actions/src/connection/action_service.rs index a657408..f787cae 100644 --- a/crates/vcs_actions/src/connection/action_service.rs +++ b/crates/vcs_actions/src/connection/action_service.rs @@ -118,7 +118,7 @@ fn build_server_future( accept_result = listener.accept(), if !shutdown_requested => { match accept_result { Ok((stream, _addr)) => { - info!("New connection accepted."); + info!("New connection. (now {})", active_connections); let _ = tx.send(1).await; let vault_clone = vault.clone(); @@ -127,7 +127,7 @@ fn build_server_future( spawn(async move { process_connection(stream, vault_clone, action_pool_clone).await; - info!("A connection closed."); + info!("A connection closed. (now {})", active_connections); let _ = tx_clone.send(-1).await; }); } |
