diff --git a/src/runtime/communication.rs b/src/runtime/communication.rs index 9b0780de5ba0f4fc6bb45870d0e9cf970786ef44..233df882222cf12f109238462a28fd3648f44650 100644 --- a/src/runtime/communication.rs +++ b/src/runtime/communication.rs @@ -464,9 +464,9 @@ impl MonoContext for MonoPContext<'_> { type D = ProtocolD; type S = ProtocolS; fn new_component(&mut self, moved_ekeys: HashSet, init_state: Self::S) { - lockprintln!( - "{:?}: !! MonoContext callback to new_component with ekeys {:?}!", - self.inner.channel_id_stream.controller_id, + log!( + &mut self.inner.logger, + "!! MonoContext callback to new_component with ekeys {:?}!", &moved_ekeys, ); if moved_ekeys.is_subset(self.ekeys) { @@ -487,21 +487,21 @@ impl MonoContext for MonoPContext<'_> { info: EndpointInfo { polarity: Putter, channel_id }, endpoint: b, }); - lockprintln!( - "{:?}: !! MonoContext callback to new_channel. returning ekeys {:?}!", - self.inner.channel_id_stream.controller_id, + log!( + &mut self.inner.logger, + "!! MonoContext callback to new_channel. returning ekeys {:?}!", [kp, kg], ); [kp, kg] } - fn new_random(&self) -> u64 { + fn new_random(&mut self) -> u64 { type Bytes8 = [u8; std::mem::size_of::()]; let mut bytes = Bytes8::default(); getrandom::getrandom(&mut bytes).unwrap(); let val = unsafe { std::mem::transmute::(bytes) }; - lockprintln!( - "{:?}: !! MonoContext callback to new_random. returning val {:?}!", - self.inner.channel_id_stream.controller_id, + log!( + &mut self.inner.logger, + "!! MonoContext callback to new_random. returning val {:?}!", val, ); val @@ -591,24 +591,24 @@ impl SolutionStorage { impl PolyContext for BranchPContext<'_, '_> { type D = ProtocolD; - fn is_firing(&self, ekey: Key) -> Option { + fn is_firing(&mut self, ekey: Key) -> Option { assert!(self.ekeys.contains(&ekey)); let channel_id = self.m_ctx.inner.endpoint_exts.get(ekey).unwrap().info.channel_id; let val = self.predicate.query(channel_id); - lockprintln!( - "{:?}: !! PolyContext callback to is_firing by {:?}! returning {:?}", - self.m_ctx.inner.channel_id_stream.controller_id, + log!( + &mut self.m_ctx.inner.logger, + "!! PolyContext callback to is_firing by {:?}! returning {:?}", self.m_ctx.my_subtree_id, val, ); val } - fn read_msg(&self, ekey: Key) -> Option<&Payload> { + fn read_msg(&mut self, ekey: Key) -> Option<&Payload> { assert!(self.ekeys.contains(&ekey)); let val = self.inbox.get(&ekey); - lockprintln!( - "{:?}: !! PolyContext callback to read_msg by {:?}! returning {:?}", - self.m_ctx.inner.channel_id_stream.controller_id, + log!( + &mut self.m_ctx.inner.logger, + "!! PolyContext callback to read_msg by {:?}! returning {:?}", self.m_ctx.my_subtree_id, val, );