1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-16 16:08:59 +02:00

Compare commits

..

4 Commits

Author SHA1 Message Date
Rob Ede
855e3f96fe prepare actix-tls release 3.0.4 2022-03-15 19:43:47 +00:00
Rob Ede
737b438f73 prepare actix-codec release 0.5.1 2022-03-15 19:43:06 +00:00
Rob Ede
0cd70b0536 use tracing for logs (#451) 2022-03-15 19:37:08 +00:00
Rob Ede
4b6a581ef3 prepare actix-server release 2.1.1 2022-03-09 01:08:35 +00:00
14 changed files with 35 additions and 19 deletions

View File

@@ -1,8 +1,14 @@
# Changes # Changes
## Unreleased - 2022-xx-xx ## Unreleased - 2022-xx-xx
## 0.5.1 - 2022-03-15
- Logs emitted now use the `tracing` crate with `log` compatibility. [#451]
- Minimum supported Rust version (MSRV) is now 1.49. - Minimum supported Rust version (MSRV) is now 1.49.
[#451]: https://github.com/actix/actix-net/pull/451
## 0.5.0 - 2022-02-15 ## 0.5.0 - 2022-02-15
- Updated `tokio-util` dependency to `0.7.0`. [#446] - Updated `tokio-util` dependency to `0.7.0`. [#446]

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "actix-codec" name = "actix-codec"
version = "0.5.0" version = "0.5.1"
authors = [ authors = [
"Nikolay Kim <fafhrd91@gmail.com>", "Nikolay Kim <fafhrd91@gmail.com>",
"Rob Ede <robjtede@icloud.com>", "Rob Ede <robjtede@icloud.com>",
@@ -21,11 +21,11 @@ bitflags = "1.2"
bytes = "1" bytes = "1"
futures-core = { version = "0.3.7", default-features = false } futures-core = { version = "0.3.7", default-features = false }
futures-sink = { version = "0.3.7", default-features = false } futures-sink = { version = "0.3.7", default-features = false }
log = "0.4"
memchr = "2.3" memchr = "2.3"
pin-project-lite = "0.2" pin-project-lite = "0.2"
tokio = "1.13.1" tokio = "1.13.1"
tokio-util = { version = "0.7", features = ["codec", "io"] } tokio-util = { version = "0.7", features = ["codec", "io"] }
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
[dev-dependencies] [dev-dependencies]
criterion = { version = "0.3", features = ["html_reports"] } criterion = { version = "0.3", features = ["html_reports"] }

View File

@@ -197,11 +197,11 @@ impl<T, U> Framed<T, U> {
} }
} }
log::trace!("attempting to decode a frame"); tracing::trace!("attempting to decode a frame");
match this.codec.decode(this.read_buf) { match this.codec.decode(this.read_buf) {
Ok(Some(frame)) => { Ok(Some(frame)) => {
log::trace!("frame decoded from buffer"); tracing::trace!("frame decoded from buffer");
return Poll::Ready(Some(Ok(frame))); return Poll::Ready(Some(Ok(frame)));
} }
Err(err) => return Poll::Ready(Some(Err(err))), Err(err) => return Poll::Ready(Some(Err(err))),
@@ -242,10 +242,10 @@ impl<T, U> Framed<T, U> {
U: Encoder<I>, U: Encoder<I>,
{ {
let mut this = self.as_mut().project(); let mut this = self.as_mut().project();
log::trace!("flushing framed transport"); tracing::trace!("flushing framed transport");
while !this.write_buf.is_empty() { while !this.write_buf.is_empty() {
log::trace!("writing; remaining={}", this.write_buf.len()); tracing::trace!("writing; remaining={}", this.write_buf.len());
let n = ready!(this.io.as_mut().poll_write(cx, this.write_buf))?; let n = ready!(this.io.as_mut().poll_write(cx, this.write_buf))?;
@@ -264,7 +264,7 @@ impl<T, U> Framed<T, U> {
// Try flushing the underlying IO // Try flushing the underlying IO
ready!(this.io.poll_flush(cx))?; ready!(this.io.poll_flush(cx))?;
log::trace!("framed transport flushed"); tracing::trace!("framed transport flushed");
Poll::Ready(Ok(())) Poll::Ready(Ok(()))
} }

View File

@@ -3,6 +3,10 @@
## Unreleased - 2022-xx-xx ## Unreleased - 2022-xx-xx
## 2.1.1 - 2022-03-09
- No significant changes since `2.1.0`.
## 2.1.0 - 2022-03-08 ## 2.1.0 - 2022-03-08
- Update `tokio-uring` dependency to `0.3.0`. [#448] - Update `tokio-uring` dependency to `0.3.0`. [#448]
- Logs emitted now use the `tracing` crate with `log` compatibility. [#448] - Logs emitted now use the `tracing` crate with `log` compatibility. [#448]

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "actix-server" name = "actix-server"
version = "2.1.0" version = "2.1.1"
authors = [ authors = [
"Nikolay Kim <fafhrd91@gmail.com>", "Nikolay Kim <fafhrd91@gmail.com>",
"fakeshadow <24548779@qq.com>", "fakeshadow <24548779@qq.com>",
@@ -34,7 +34,7 @@ mio = { version = "0.8", features = ["os-poll", "net"] }
num_cpus = "1.13" num_cpus = "1.13"
socket2 = "0.4.2" socket2 = "0.4.2"
tokio = { version = "1.13.1", features = ["sync"] } tokio = { version = "1.13.1", features = ["sync"] }
tracing = { version = "0.1.30", features = ["log"] } tracing = { version = "0.1.30", default-features = false, features = ["log"] }
# runtime for `io-uring` feature # runtime for `io-uring` feature
[target.'cfg(target_os = "linux")'.dependencies] [target.'cfg(target_os = "linux")'.dependencies]

View File

@@ -3,10 +3,10 @@
> General purpose TCP server built for the Actix ecosystem. > General purpose TCP server built for the Actix ecosystem.
[![crates.io](https://img.shields.io/crates/v/actix-server?label=latest)](https://crates.io/crates/actix-server) [![crates.io](https://img.shields.io/crates/v/actix-server?label=latest)](https://crates.io/crates/actix-server)
[![Documentation](https://docs.rs/actix-server/badge.svg?version=2.1.0)](https://docs.rs/actix-server/2.1.0) [![Documentation](https://docs.rs/actix-server/badge.svg?version=2.1.1)](https://docs.rs/actix-server/2.1.1)
[![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html) [![Version](https://img.shields.io/badge/rustc-1.52+-ab6000.svg)](https://blog.rust-lang.org/2021/05/06/Rust-1.52.0.html)
![License](https://img.shields.io/crates/l/actix-server.svg) ![License](https://img.shields.io/crates/l/actix-server.svg)
[![Dependency Status](https://deps.rs/crate/actix-server/2.1.0/status.svg)](https://deps.rs/crate/actix-server/2.1.0) [![Dependency Status](https://deps.rs/crate/actix-server/2.1.1/status.svg)](https://deps.rs/crate/actix-server/2.1.1)
![Download](https://img.shields.io/crates/d/actix-server.svg) ![Download](https://img.shields.io/crates/d/actix-server.svg)
[![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x) [![Chat on Discord](https://img.shields.io/discord/771444961383153695?label=chat&logo=discord)](https://discord.gg/NWpN5mmg3x)

View File

@@ -3,6 +3,12 @@
## Unreleased - 2022-xx-xx ## Unreleased - 2022-xx-xx
## 3.0.4 - 2022-03-15
- Logs emitted now use the `tracing` crate with `log` compatibility. [#451]
[#451]: https://github.com/actix/actix-net/pull/451
## 3.0.3 - 2022-02-15 ## 3.0.3 - 2022-02-15
- No significant changes since `3.0.2`. - No significant changes since `3.0.2`.

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "actix-tls" name = "actix-tls"
version = "3.0.3" version = "3.0.4"
authors = [ authors = [
"Nikolay Kim <fafhrd91@gmail.com>", "Nikolay Kim <fafhrd91@gmail.com>",
"Rob Ede <robjtede@icloud.com>", "Rob Ede <robjtede@icloud.com>",
@@ -48,9 +48,9 @@ actix-service = "2.0.0"
actix-utils = "3.0.0" actix-utils = "3.0.0"
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] } futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
log = "0.4"
pin-project-lite = "0.2.7" pin-project-lite = "0.2.7"
tokio-util = "0.7" tokio-util = "0.7"
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
# uri # uri
http = { version = "0.2.3", optional = true } http = { version = "0.2.3", optional = true }

View File

@@ -34,9 +34,9 @@ use actix_server::Server;
use actix_service::ServiceFactoryExt as _; use actix_service::ServiceFactoryExt as _;
use actix_tls::accept::rustls::{Acceptor as RustlsAcceptor, TlsStream}; use actix_tls::accept::rustls::{Acceptor as RustlsAcceptor, TlsStream};
use futures_util::future::ok; use futures_util::future::ok;
use log::info;
use rustls::{server::ServerConfig, Certificate, PrivateKey}; use rustls::{server::ServerConfig, Certificate, PrivateKey};
use rustls_pemfile::{certs, rsa_private_keys}; use rustls_pemfile::{certs, rsa_private_keys};
use tracing::info;
#[actix_rt::main] #[actix_rt::main]
async fn main() -> io::Result<()> { async fn main() -> io::Result<()> {

View File

@@ -8,11 +8,11 @@ use actix_rt::net::ActixStream;
use actix_service::{Service, ServiceFactory}; use actix_service::{Service, ServiceFactory};
use actix_utils::future::{ok, Ready}; use actix_utils::future::{ok, Ready};
use futures_core::future::LocalBoxFuture; use futures_core::future::LocalBoxFuture;
use log::trace;
use tokio_native_tls::{ use tokio_native_tls::{
native_tls::TlsConnector as NativeTlsConnector, TlsConnector as AsyncNativeTlsConnector, native_tls::TlsConnector as NativeTlsConnector, TlsConnector as AsyncNativeTlsConnector,
TlsStream as AsyncTlsStream, TlsStream as AsyncTlsStream,
}; };
use tracing::trace;
use crate::connect::{Connection, Host}; use crate::connect::{Connection, Host};

View File

@@ -13,9 +13,9 @@ use actix_rt::net::ActixStream;
use actix_service::{Service, ServiceFactory}; use actix_service::{Service, ServiceFactory};
use actix_utils::future::{ok, Ready}; use actix_utils::future::{ok, Ready};
use futures_core::ready; use futures_core::ready;
use log::trace;
use openssl::ssl::SslConnector; use openssl::ssl::SslConnector;
use tokio_openssl::SslStream as AsyncSslStream; use tokio_openssl::SslStream as AsyncSslStream;
use tracing::trace;
use crate::connect::{Connection, Host}; use crate::connect::{Connection, Host};

View File

@@ -12,7 +12,7 @@ use actix_rt::task::{spawn_blocking, JoinHandle};
use actix_service::{Service, ServiceFactory}; use actix_service::{Service, ServiceFactory};
use actix_utils::future::{ok, Ready}; use actix_utils::future::{ok, Ready};
use futures_core::{future::LocalBoxFuture, ready}; use futures_core::{future::LocalBoxFuture, ready};
use log::trace; use tracing::trace;
use super::{ConnectError, ConnectInfo, Host, Resolve}; use super::{ConnectError, ConnectInfo, Host, Resolve};

View File

@@ -15,10 +15,10 @@ use actix_rt::net::ActixStream;
use actix_service::{Service, ServiceFactory}; use actix_service::{Service, ServiceFactory};
use actix_utils::future::{ok, Ready}; use actix_utils::future::{ok, Ready};
use futures_core::ready; use futures_core::ready;
use log::trace;
use tokio_rustls::rustls::{client::ServerName, OwnedTrustAnchor, RootCertStore}; use tokio_rustls::rustls::{client::ServerName, OwnedTrustAnchor, RootCertStore};
use tokio_rustls::{client::TlsStream as AsyncTlsStream, rustls::ClientConfig}; use tokio_rustls::{client::TlsStream as AsyncTlsStream, rustls::ClientConfig};
use tokio_rustls::{Connect as RustlsConnect, TlsConnector as RustlsTlsConnector}; use tokio_rustls::{Connect as RustlsConnect, TlsConnector as RustlsTlsConnector};
use tracing::trace;
use webpki_roots::TLS_SERVER_ROOTS; use webpki_roots::TLS_SERVER_ROOTS;
use crate::connect::{Connection, Host}; use crate::connect::{Connection, Host};

View File

@@ -15,8 +15,8 @@ use actix_rt::net::{TcpSocket, TcpStream};
use actix_service::{Service, ServiceFactory}; use actix_service::{Service, ServiceFactory};
use actix_utils::future::{ok, Ready}; use actix_utils::future::{ok, Ready};
use futures_core::ready; use futures_core::ready;
use log::{error, trace};
use tokio_util::sync::ReusableBoxFuture; use tokio_util::sync::ReusableBoxFuture;
use tracing::{error, trace};
use super::{connect_addrs::ConnectAddrs, error::ConnectError, ConnectInfo, Connection, Host}; use super::{connect_addrs::ConnectAddrs, error::ConnectError, ConnectInfo, Connection, Host};