Respond to the connect message from a devtools client (#35745)

* Respond to the "connect" message

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

* Bump log levels in devtools implementation a bit

If everything is "debug" then nothing stands out.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-03-02 13:16:51 +01:00 committed by GitHub
parent aa26aa1963
commit e7e8ccea20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 12 deletions

View file

@ -10,7 +10,7 @@ use std::net::TcpStream;
use std::sync::{Arc, Mutex};
use base::cross_process_instant::CrossProcessInstant;
use log::{debug, warn};
use log::debug;
use serde_json::{Map, Value};
/// General actor system infrastructure.
@ -175,21 +175,22 @@ impl ActorRegistry {
let to = match msg.get("to") {
Some(to) => to.as_str().unwrap(),
None => {
warn!("Received unexpected message: {:?}", msg);
log::warn!("Received unexpected message: {:?}", msg);
return Err(());
},
};
match self.actors.get(to) {
None => debug!("message received for unknown actor \"{}\"", to),
None => log::warn!("message received for unknown actor \"{}\"", to),
Some(actor) => {
let msg_type = msg.get("type").unwrap().as_str().unwrap();
if actor.handle_message(self, msg_type, msg, stream, id)? !=
ActorMessageStatus::Processed
{
debug!(
log::warn!(
"unexpected message type \"{}\" found for actor \"{}\"",
msg_type, to
msg_type,
to
);
}
},