improvement: log REQ messages at debug level

This commit is contained in:
Greg Heartsfield 2023-01-09 22:12:20 -06:00
parent 3d3d1bde53
commit fbd3315110

View File

@ -433,6 +433,9 @@ fn convert_to_msg(msg: String, max_bytes: Option<usize>) -> Result<NostrMessage>
let parsed_res: Result<NostrMessage> = serde_json::from_str(&msg).map_err(|e| e.into());
match parsed_res {
Ok(m) => {
if let NostrMessage::SubMsg(_) = m {
debug!("REQ: {:?}",msg);
};
if let NostrMessage::EventMsg(_) = m {
if let Some(max_size) = max_bytes {
// check length, ensure that some max size is set.