Skip to content

Commit

Permalink
Merge pull request #219 from minghuaw/0.9-dev
Browse files Browse the repository at this point in the history
0.9.2
  • Loading branch information
minghuaw authored Jan 1, 2024
2 parents 6e23046 + 9a69f9a commit 1e43b46
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion fe2o3-amqp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fe2o3-amqp"
version = "0.9.1"
version = "0.9.2"
edition = "2021"
description = "An implementation of AMQP1.0 protocol based on serde and tokio"
license = "MIT/Apache-2.0"
Expand Down
12 changes: 12 additions & 0 deletions fe2o3-amqp/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## 0.9.2

1. Ported 0.7.32

## 0.8.26

1. Ported 0.7.32

## 0.7.32

1. Show frame direction in `log::trace`

## 0.9.1

1. Ported 0.7.31
Expand Down
4 changes: 2 additions & 2 deletions fe2o3-amqp/src/connection/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ where
#[cfg(feature = "tracing")]
tracing::trace!(?frame);
#[cfg(feature = "log")]
log::trace!("frame={:?}", frame);
log::trace!("RECV frame={:?}", frame);

let Frame { channel, body } = frame;
let channel = IncomingChannel(channel);
Expand Down Expand Up @@ -444,7 +444,7 @@ where
#[cfg(feature = "tracing")]
tracing::trace!(channel = frame.channel, frame = ?frame.body);
#[cfg(feature = "log")]
log::trace!("channel = {}, frame = {:?}", frame.channel, frame.body);
log::trace!("SEND channel = {}, frame = {:?}", frame.channel, frame.body);
self.transport.send(frame).await?;
Ok(Running::Continue)
}
Expand Down
4 changes: 2 additions & 2 deletions fe2o3-amqp/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ impl endpoint::Connection for Connection {
#[cfg(feature = "tracing")]
tracing::trace!(frame = ?open);
#[cfg(feature = "log")]
log::trace!("frame = {:?}", open);
log::trace!("RECV frame = {:?}", open);

match &self.local_state {
ConnectionState::HeaderExchange => self.local_state = ConnectionState::OpenReceived,
Expand Down Expand Up @@ -700,7 +700,7 @@ impl endpoint::Connection for Connection {
#[cfg(feature = "tracing")]
tracing::trace!(?frame);
#[cfg(feature = "log")]
log::trace!("frame = {:?}", frame);
log::trace!("SEND frame = {:?}", frame);
writer.send(frame).await.map_err(Into::into)?;

// change local state after successfully sending the frame
Expand Down
2 changes: 1 addition & 1 deletion fe2o3-amqp/src/link/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ where
#[cfg(feature = "tracing")]
tracing::trace!(detach = ?detach);
#[cfg(feature = "log")]
log::trace!("detach = {:?}", detach);
log::trace!("RECV detach = {:?}", detach);

match detach.closed {
true => match self.local_state {
Expand Down
4 changes: 2 additions & 2 deletions fe2o3-amqp/src/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ impl endpoint::Session for Session {
#[cfg(feature = "tracing")]
tracing::trace!(frame = ?detach);
#[cfg(feature = "log")]
log::trace!("frame = {:?}", detach);
log::trace!("RECV frame = {:?}", detach);
// Remove the link by input handle
match self
.link_by_input_handle
Expand All @@ -762,7 +762,7 @@ impl endpoint::Session for Session {
#[cfg(feature = "tracing")]
tracing::trace!(end = ?end);
#[cfg(feature = "log")]
log::trace!("end = {:?}", end);
log::trace!("RECV end = {:?}", end);
match self.local_state {
SessionState::BeginSent | SessionState::BeginReceived | SessionState::Mapped => {
self.local_state = SessionState::EndReceived;
Expand Down
8 changes: 4 additions & 4 deletions fe2o3-amqp/src/transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ where
#[cfg(feature = "tracing")]
tracing::event!(parent: &span, tracing::Level::TRACE, ?proto_header);
#[cfg(feature = "log")]
log::trace!("proto_header = {:?}", proto_header);
log::trace!("SEND proto_header = {:?}", proto_header);
framed_write.send(proto_header).await?;

#[cfg(feature = "tracing")]
Expand All @@ -195,7 +195,7 @@ where
#[cfg(feature = "tracing")]
tracing::event!(parent: &span, tracing::Level::TRACE, ?incoming_header);
#[cfg(feature = "log")]
log::trace!("incoming_header = {:?}", incoming_header);
log::trace!("RECV incoming_header = {:?}", incoming_header);

if !incoming_header.is_sasl()
|| incoming_header.major != MAJOR
Expand Down Expand Up @@ -310,7 +310,7 @@ where
#[cfg(feature = "tracing")]
tracing::trace!(?proto_header);
#[cfg(feature = "log")]
log::trace!("proto_header = {:?}", proto_header);
log::trace!("SEND proto_header = {:?}", proto_header);
match local_state {
ConnectionState::Start => {
framed_write.send(proto_header).await?;
Expand Down Expand Up @@ -353,7 +353,7 @@ where
#[cfg(feature = "tracing")]
tracing::trace!(?proto_header);
#[cfg(feature = "log")]
log::trace!("proto_header = {:?}", proto_header);
log::trace!("RECV proto_header = {:?}", proto_header);

Ok(proto_header)
}
Expand Down

0 comments on commit 1e43b46

Please sign in to comment.