//! Defines the logging of transaction messages sent to the server Transaction Actor.
use crate::logging::messages::transactions::base::TransactionJourney;
use crate::messages::server::wrapper::WrappedServerMessage;

/// Logs a transaction message that the server Transaction Actor has received.
///
/// # Arguments
/// * `message`: the transaction message that the server Transaction Actor has received
pub fn log_server_transaction_actor_message(message: &WrappedServerMessage) {
	let pointer = TransactionJourney::RecievedByServerTransactionActor;

	let log = pointer.from_wrapped_server_message(message);
	if log.is_some() {
		tracing::trace!("{}", log.unwrap());
	}
}
