Skip to content

Commit e6635ac

Browse files
committed
Log fix: Log the host:port when creating a new connection
1 parent 173a9af commit e6635ac

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

redis/src/aio/connection.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ pub(crate) async fn connect_simple<T: RedisRuntime>(
469469
}
470470
let socket_addrs = get_socket_addrs(host, port).await?;
471471
select_ok(socket_addrs.map(|socket_addr| {
472-
log_conn_creation("TCP", host, Some(socket_addr.ip()));
472+
log_conn_creation("TCP", format!("{host}:{port}"), Some(socket_addr.ip()));
473473
Box::pin(async move {
474474
Ok::<_, RedisError>((
475475
<T>::connect_tcp(socket_addr).await?,
@@ -496,7 +496,11 @@ pub(crate) async fn connect_simple<T: RedisRuntime>(
496496
}
497497
let socket_addrs = get_socket_addrs(host, port).await?;
498498
select_ok(socket_addrs.map(|socket_addr| {
499-
log_conn_creation("TCP with TLS", host, Some(socket_addr.ip()));
499+
log_conn_creation(
500+
"TCP with TLS",
501+
format!("{host}:{port}"),
502+
Some(socket_addr.ip()),
503+
);
500504
Box::pin(async move {
501505
Ok::<_, RedisError>((
502506
<T>::connect_tcp_tls(host, socket_addr, insecure, tls_params).await?,

0 commit comments

Comments
 (0)